My code works if I don't include any numbers in the response. If I type "Hello2" as an answer for example, it still prints "Hello2". I'm trying to use the isalpha(), but it doesn't seem like I'm using it properly. Thought it was supposed to stop any printing if the word typed includes anything besides letters.
The error I get when I type "Hello2" is:
"It looks like your code prints original ("Hello2") when original includes non-alphabetical characters."
What am I doing wrong?
print 'Welcome to the Pig Latin Translator!' # Start coding here! original = raw_input("Enter a word:") print original if len(original) > 0 and original.isalpha(): print "Thanks!" elif len(original) == 0: print "empty" else: print "You forgot to give me a word!"