Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Value error exception

#You have to break to get out of the loop
try:
	x = int(input("What's x? "))
except ValueError:
	print("x is not an integer")
else:
	break
    
print(f"x is {x}")
 
PREVIOUS NEXT
Tagged: #Value #error #exception
ADD COMMENT
Topic
Name
6+1 =