values = [] while True: user_input = input('Please type in a numerical value') if user_input == 'done': print('All Done') break try: val_input = float(user_input) except ValueError: print('You have typed in an invalid value. Please type in a numerical whole number') continue values.append(user_input) print(val_input)
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)