how to check if correct number is input python code example
Example: how to say that an input needs to be a number python
try:
val = int(userInput)
except ValueError:
print("That's not an int!")
try:
val = int(userInput)
except ValueError:
print("That's not an int!")