import math import sys def fv(v0, a, n, dt): v=v0 for i in range(0, n): v=v+a*dt return v def fPhi(Phi0, v0, n, dt): Phi=Phi0 for i in range(0, n+1): a=fa(Phi) v=fv(v0, a, i, dt) Phi=Phi+v*dt return Phi def fa(Phi): a=math.sin(Phi)/0.314**2 return a dt=0.01 Phi0=float(sys.argv[1]) v0=0 n=0 Phi=fPhi(Phi0, v0, n, dt) while(Phi", Phi, "--- t=", n*dt, "s") n+=1 Phi=fPhi(Phi0, v0, n, dt) print(math.pi/2)