Error with python 3 homework -


i have homework on python 3 do, using if, elif, else, .isdigit, .isalpha dont know why doesn't work..

numword = ""  def str_analysis():     if numword.isalpha() == true:         print(numword, "is alphabetical characters!")     elif numword.isdigit() == true:         if int(numword) == 100:             print("you found right number!")         elif int(numword) >= 99:             print(numword, "is pretty big number")         elif int(numword) <= 99:             print(numword, "is smaller number expected")  while numword.isalnum() == false:     numword = input("enter word or integer: ") 

you need call function wrote:

while numword.isalnum() == false:     numword = input("enter word or integer: ") str_analysis() 

Comments

Popular posts from this blog

javascript - Create a stacked percentage column -

Optimising Firebase database by automatically overwriting data -

javascript - Angular UI-Grid customTemplate directive causing rows to load slowly/? -