Feb-18-2020, 09:45 PM
(Feb-18-2020, 12:16 PM)jefsummers Wrote: For that you want to use a try...except and catch a Value Error.
dunce = True while dunce: try : flscore = float(input('Enter a number between 0 and 1: ')) except ValueError: print('Invalid entry') else : if flscore<0 or flscore>1.0: print('Cant you read! Try that again and your computer will shock you!') else: dunce = False print('Moving on')
Thank you very very much!