# tempWarn-v2.py # Neal Nelson 2009.11.09 # # This needs to be tested. def warn(temp): if temp > 90: print "It's really hot out there, be careful!" elif temp >= 80: print "Take some water with you" elif temp >= 50: print "It's OK today" elif temp >= 40: print "Brrrr. Be sure to dress warmly!" elif temp >= 30: print "Ohh it's really cold!" else: print "Ohhh its less than 30, stay home!" def ctof(c): return 9.0/5.0 * c + 32 def main(): celsius = input("What is the Celsius temperature? ") warn(ctof(celsius)) main()