Answers for "fix vaue error in python"

0

how to fix valueerror in python

#Instead of
a = int(input("What is x?"))
#Put
try:
  	a = int(input("What is x?"))
except ValueError:
  print ("Insert ValueError message here")
#This way your program won't crash
Posted by: Guest on April-19-2020
0

how to fix valueerror in python

#Instead of
a = int(input("What is x?"))
#Put
try:
  	a = int(input("What is x?"))
except ValueError:
  print ("Insert ValueError message here")
#This way your program won't crash
Posted by: Guest on April-19-2020

Python Answers by Framework

Browse Popular Code Answers by Language