blob: 7e92f1d6665badef3571ba034f670ee9fd5568fa (
plain)
1
2
3
4
5
6
7
8
9
|
def is_valid_number(num):
try:
int(num)
print "You wrote a number"
except:
print "Sorry but, you didn't write a number"
number1 = input("Give me any input and I will tell you if it's a number: ")
is_valid_number(number1)
|