Displays artificial gravity parameters. From Python for NumWorks pg. 216
# station_gravity.py from math import * print("\rRadius of rotation (meters)") print("Seconds per rotation") print("Gs = normal gravity is 1.0") print("\nEnter all except for unknown") a="\nRadius: " b="Seconds/rot: " c="Gs of accel: " r=input(a) r=float(r) if r else 0 s=input(b) s=float(s) if s else 0 g=input(c) g=float(g) if g else 0 if not r: r=9.8*g*s**2/(4*pi**2) if not s: s=2*pi/(9.8*g/r)**.5 if not g: g=4*pi*pi*r/9.8/s**2 print(a,r) print(b,s) print(c,g)