# windchill.py
# tpm
# A program that prints a nicely formatted table of windchill values.
from math import *
def windchill(t, v):
c = 35.74 + (0.6215 * t) - (35.75 * v ** .16) + (.4275 * t * v ** .16)
return c
def main():
print "MPH:",
for k in range (-20, 70, 10):
print "%3d" %k,
print
print "_" * 44
for velocity in range (5, 55, 5):
print "%3d" %velocity,
for temp in range (-20, 70, 10):
chill = windchill(temp, velocity)
print "%3d" %round(chill),
print
main()
:o