codepad
[
create a new paste
]
login
|
about
Language:
C
C++
D
Haskell
Lua
OCaml
PHP
Perl
Plain Text
Python
Ruby
Scheme
Tcl
import math mass = 1000 periods = [1,60,3600] output = "Gravity Fun at TestTubeGames: [ForceG: -2,Qual: 1,Zoom: 1,xSet: 0,ySet: 0], [x0: 0,y0: 0,vx: 0,vy: 0,t0: 0,who: 1,m: " + str(mass) + "]" for a in periods: radius = ((36*a/(2*math.pi))**2*mass)**(1.0/3) vel = math.sqrt(mass/radius) output = output + ", [x0: 0,y0: " + str(-radius) + ",vx: " + str(vel) + ",vy: 0,t0: 0,who: 3,m: 0]" print output
Private
[
?
]
Run code
Submit