0

def windchill(temp, vel):
wc = 35.74 + .6215*temp - (35.75*vel**.16 + .4275*temp*vel**.16)
return wc

def main():
print (" __ __ __Temp /n")
print (" Speed /n")
print ("-20 70 10 0 10 20 30 40 50 60 ")

for x in range (5,55,5):
print x
for y in range (-20,70,10):
chill =windchill(x,y)
print chill + " "


main()

:mad: :cry: :o

2
Contributors
1
Reply
2
Views
11 Years
Discussion Span
Last Post by bumsfeld
0

Once more, please put your code into code tags to show the right indentation, see:
http://www.daniweb.com/techtalkforums/announcement114-3.html

Most people will not read any of your code unless you do that!

Your first program worked just fine, why did you change it?

This program will give you error, because you are giving it negative windspeeds! Use more meaningful variable names, t and v rather than x and y and you discover your mistakes!

Also newline is \n

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.