Hello, I'm at PygLatin section of the Python course, at the popquiz section.
I did what the instructions told me to and there is no problem with that.But to get a better understanding of the if, elif etc statements, i tried to add a piece of code which was supposed to print "Your code contains numbers" instead of just printing "empty".
So, I added this piece of code to the original code expecting the terminal to display only the "Your code contains numbers" message but when I type a word combined with numbers the output is:
Your word contains numbers empty None
Below is the full code. Any help would be appreaciated.
' ' '
if not original.isalpha(): print "Your word contains numbers"
' ' '
print 'Welcome to the Pig Latin Translator!' # Start coding here! original = raw_input("Enter a word: ") if not original.isalpha(): print "Your word contains numbers" if len(original) > 0 and original.isalpha(): print original else: len(original) <= 0 print ("empty") if original.isalpha(): if False: print "Your word contains numbers"