3
# Probably not very Pythonic, but it runs well with both Python2 and Python3
9
for frac_part in range(0,10):
10
sys.stdout.write(" %5d" % frac_part)
13
for angle_deg in range(0,90):
14
sys.stdout.write("%3d " % angle_deg)
15
for angle_deg_frac in range(0,10):
16
angle = math.radians(angle_deg + angle_deg_frac/10.)
17
value = math.sin(angle) * 10000 + 0.5
19
sys.stdout.write(" %05d" % (value))
21
sys.stdout.write(" %04d" % (value))