4. Check yourself



"The original variable ("raw_input") had more than 0 characters but did not get printed."

"Good" gets printed but the error message still shows

print 'Welcome to the Pig Latin Translator!'

# Start coding here!
name = raw_input("What is your name?")
original = "raw_input"
if len(original) > 0:
    print "Good"
    print "Please enter your name"



leave it as an open string like this.

original =""

On else, you should print "empty" and not what you did. See instructions.

    print "empty"

Finally, I don't see a need for this from the instruction.



Thanks, it worked. Corrected all the mistakes you pointed out.


There's one problem, I have passed it but it always prints "empty", whenever i click submit and then enter my name. It should print "good", right?


Yeah, so we correct that by asking that if the if statement is fulfilled, it should print it, Like this.

print 'Welcome to the Pig Latin Translator!'

# Start coding here!
original = raw_input("Enter a word: ")

if len(original) > 0:
    print original
    print "empty"

I am sorry that my original post didn't satisfy all conditions. :disappointed:


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