fork download
  1. import math
  2. def meteor(n):
  3. r= .09
  4. m=7
  5. b=1.5e-3
  6. x=200.*1000.
  7. v=-20.*1000.
  8. H=7.6*1000.
  9. g=9.8
  10. t_max=-x/v*10.
  11. dt=t_max/n
  12. for i in range (n):
  13. dx=v*dt
  14. x=x+dt
  15. if x<0.:
  16. return v
  17. F=b*v**2*mat.exp(-x/H)-m*g
  18. a=F/m
  19. dv=a*dt
  20. v=v+dv
  21. return-999
Runtime error #stdin #stdout 0.03s 6352KB
stdin
Standard input is empty
stdout
Standard output is empty