Dec-09-2021, 08:12 PM
It doesn't make any sense to catch the error and break out of the program. This will continue until you press ctrl+c. If you type something other than a number the program prints the error message but continues running.
while True: try: print(float(input('num1 >> ')) + float(input('num2 >> '))) except ValueError as msg: print(msg)