Assigning variable to be the result of a function?


#1



https://www.codecademy.com/en/courses/python-beginner-2W5v7/0/5?curriculum_id=4f89dab3d788890003000096


When I "Save and Submit" my code, it checks out. However, when I actually test it out by typing in a word in the interpreter box, the response generated is "Enter a word," essentially repeating the first prompt. If I type in another word, then and only then does the code respond by repeating (and validating) the word I just typed.

I think my code is currently just programmed to display those words "Enter a word," rather than the actual raw data (word) entered by the user. There's a problem with my variable and function, I believe.

How do I write my variable and function, etc, so that my code returns the raw data when the user enters a word? (assuming it meets the conditions set forth later in the code, i.e. it is more than one character and it is alphabetic, not numeric).

Thank you!

Here's a picture of what happens....


print 'Welcome to the Pig Latin Translator!'

raw_input("Enter a word:")
original = raw_input("Enter a word:")

if len(original) > 0 and original.isalpha():
    print original
    
else:
    print "empty"


#2

This line may be removed.


#3

Nice, thanks for the tip! I just edited it and it works fine now:)

Such a simple fix.......


#4