# # 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 = input("Please input todays temperature (press Enter to quit):") if T_s == "": print("No temperature reading was provided, \ which means that you want to terminate the program. Have a good day!") break # break exits/terminates any loop else : T = float(T_s) if T > 90: print("It is hot today. Stay out of the sun!\n") elif T <= 90 and T >= 70: print("It is nice and warm today!\n") elif T < 70 and T >= 32: print(" It is cold today.\n") else: print("It is freezing today. Don't forget to wear mittens and hat!\n") main()