This is the code that I wrote for the tutorial. It let me pass the section and it seems to be working as the computer thinks it should, but I'm a bit lost as to why it's doing what it's doing.
print 'Welcome to the Pig Latin Translator!'
raw_input("Enter a word:")
original = raw_input()
if len(original) > 0 and original.isalpha():
So the way I'm reading this code is like this:
It immediately welcomes me to using the translator. Immediately it asks me to type in any word I choose. That word is stored as the variable original. If the length of the word I wrote is more than 0 letters long and is made of only letters it should print the word that was entered. Otherwise it will print empty.
My issue is that no matter what word I type it prints "empty". Do I need to tell it to check the length of the word? I thought that was the point of the len(original) > 0. If anyone could shed light on this for me I would really appreciate it.