1try:
2 val = int(userInput)
3except ValueError:
4 print("That's not an int!")
1user_input = input("Enter something:")
2
3if type(user_input) == int:
4 return user_input
5else:
6 print("Not a number")
1user_input = input("Enter something:")
2
3if type(user_input) == int:
4 print("Is a number")
5else:
6 print("Not a number")