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