Check Yourself!


The interper says Oops! Did you accidentally delete the variable called original?

I thought this was the right answer, PLEASE HELP!

Here is the code:
Replace this line with your code. 
print 'Welcome to the Pig Latin Translator!'

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


Look at the spelling in your if statement.


That's not the only thing, this:

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

should be one line, like this:

original = raw_input("Enter a word:")


thanks the code worked :grin:


Also, unless you left this part of your code out of your initial post, It would appear that you did not complete steps two and three of the instructions:

Step 2: If the string actually has some characters in it, print the user's word.
Step 3. Otherwise (i.e. an else: statement), please print "empty".


thanks for your help :smile:


No problem. If you have any issues with those steps, just ask.


Strange one, this passes:

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

I know why it passes, but it shouldn't be able to. Heck, you don't even need to use raw_input() to pass. Or the if statement for that matter.


That is weird. Frankly, Codecademy's SCT is just weird in general.


OK, it's now decided I do need the if statement, but not the else or the raw_input. As you say, the STC isn't bullet proof.


The SCT does indeed have its flaws, but to exploit those flaws is inadvisable. We would much rather prefer you follow the instructions to build functioning code that you can understand, rather than exploiting the SCT merely because you can.


Of course, I wasn't suggesting to, more pointing out the original code very nearly passed without actually doing what was required.


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