In [1]:
  m=1 # [kg] mass of the object
  x=5;# initial position
  v=0 # initial velocity
  g=9.776 #[m/s^2] gravitational constant Bogota
  F=-m*g
  dt=0.003 # [s] time advance
  t=0 # [s] initial time
In [2]:
Time = []
Position=[]
while x>0:  
  t=t+dt # time evolution
  Time.append(t)
  a=F/m # acceleration "evolution"
  v=v+a*dt # velocity evolution
  x=x+v*dt # position evolution
  Position.append(x)
In [4]:
from matplotlib import pyplot
pyplot.plot(Time, Position)
pyplot.xlabel('t [s]');pyplot.ylabel('x [m]');