# tempWarn.py # Neal Nelson 2009.11.09, modified from Zelle convert2.py p 202 # def warn(temp): if temp > 90: print "It's really hot out there, be careful!" elif temp < 40: print "Brrrr. Be sure to dress warmly!" else: print "Should sort-of comfortable today!" def ctof(c): return 9.0/5.0 * c + 32 def main(): celsius = input("What is the Celsius temperature? ") warn(ctof(celsius)) main()