Check Yourself


The exercise is letting me move on, but if I enter a word, the code is returns with :
Welcome to the Pig Latin Translator!
Enter a word: asdf


According to the instructions, the word I entered (asdf) should be printed to the console.

print 'Welcome to the Pig Latin Translator!'

# Start coding here!
raw_input("Enter a word:")
original = raw_input ()
if len(original) > 0:
    print original
    print "empty"


For me, I changed

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


original = raw_input("Enter a word:")

Reason: in your above example, you get input and don't store it in a variable. Then you get MORE input and store it in the original variable.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.