0

Number checker

How can I make a number checker? I would like to make an input checker. This function will check for input and if user inputs number, not text and other, function will, for example, print 1

12th Nov 2016, 7:33 AM
Xenonium Oxygen
Xenonium Oxygen - avatar
2 odpowiedzi
0
Specify the programming language please xD
12th Nov 2016, 1:17 PM
Gleb Golov
Gleb Golov - avatar
0
user_input = input("Enter something:") if type(user_input) == int: print("Is a number") else: print("Not a number")
29th Nov 2016, 5:06 AM
Manasvee Kumar
Manasvee Kumar - avatar