I need to add an error message if the user enters a string instead of an integer in my menu selection, and also amounts that the user input as data. I tried this code but it doesn't work.
import sys
try:
    newamount=int(input('Enter the new amount:'))
except ValueError:
    print ("error")
What am I doing wrong?
 
     
     
     
    