Pyg Latin pop quiz question


#1

I've passed the Quiz. My code looks fine to me (so it's probably wrong), but the window prints empty, even when I write with only letters.

Code

name=raw_input("Enter a word:")
original=raw_input()
empty_string=""
if len(original) > 0 and original.isalpha():
    print original
else:
    print "empty"

I entered celery into the window and it printed empty.


#2

Hard to tell what purpose that serves. I think it possible to do away with that line.

Not sure where the variable name came from. It is nowhere in the instructions.

To which raw_input statement did you enter, 'celery'?


#3

I have to admit I saw "empty_string" on someone's potential solution to
this lesson. You are right, it is not necessary, I see now that the "If
and" operates in a way that does not need a second definition for an empty
input. Name was used to define my variable. I have since cut the top line
and defined it solely with original. The output is now correct, thank you.
I am finally starting to understand efficiency within coding.


#4
Instructions... Innovation... Execution.

Remember what is at the lead and the rest will follow.