954,549 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Its Running, But The Numbers Isn't Lining Up Straight.please Help

THE WINDCHILL TABLE IS RUNNING, BUT THE NUMBER IS NOT LINNING UP STRAIGHT. CAN YOU PLEASE HELP ME, THANKS

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


def main():
    print (" __ __ __               Temperature \n")
    print ("Speed \n")
    print (" 1 -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 str(int(chill)) + " ",
       



main()


:mad: :evil: :cry: :o

butterflyTee
Light Poster
43 posts since Feb 2006
Reputation Points: 10
Solved Threads: 0
 
print str(int(chill)) + " ",

you can try this statement instead :

print "%3s" % str(int(chill)) + " ",

greatbear
Newbie Poster
3 posts since Apr 2006
Reputation Points: 10
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You