0
i cant tell why this will not work
def str_ana(test_string): if test_string.isdigit(): if test_string > 99: print(test_string, "is a big number") else: print(test_string, "is not a big number") else: if test_string.alpha(): print("\"" + test_string + "\"", "is a word") else: print("\"" + test_string + "\"", "is a suprise") entry = int(input("Give me a number")) print(str_ana(entry))
1 Answer
+ 2
You're changing the input to an int and then doing test_string.isdigit() which doesn't work for a number. It's a string method.