# # This program takes a temperature, in Fahrenheits, as an input. # Allows user to re-enter the temperature as many times as he/she wants. # The program is stopped by pressing Enter without entering any value # def main(): while True: # an infinite loop T_s=raw_input("Please input todays temperature (press Enter to quit):") if T_s == "": print "Have a good day!" break # break exits any loop else : T = eval(T_s) if T >= 90: print "It is hot today. Stay out of the sun!\n" if T < 90 and T >= 70: print "It is nice and warm today!\n" if T < 70 and T >= 32: print " It is cold today.\n" if T <32: print "It is freezing today. Don't forget to wear mittens and hat!\n" main()