0
[SOLVED] here is ValueError, but except isn't working
pin = int(input()) try: print('PIN code is created') except ValueError: print ('Please enter a number')
3 ответов
+ 3
Make it like this:
try:
pin = int(input())
print('PIN code is created')
except ValueError:
print ('Please enter a number')
+ 3
You have to put the try around the input to get a value error of the input is not a number
+ 2
There is no value in the try part. Which value do you want to try?