Check yourself


I can't see anything wrong with my code but the error
Oops, try again. The original variable ("Luke") had more than 0 characters but did not get printed. comes up.
here's my code:

print 'Welcome to the Pig Latin Translator!'

Start coding here!

original = raw_input("Enter a word:")

if len(empty_string) > 0:
print original

print "empty"

your help would be appreciated a lot.


Why are you checking if Len(empty_string) is greater than zero? I think that the lesson wants you to check if original is greater than zero. :wink:


Also you seem to be missing a step in between the if and and the original = raw_input. I would suggest looking at the example for a hint at what might be required. Also, when you put original in the len() instead of empty_string like @kyleaw said, you are going to have to print something else. Very similar to the in between step as well. If need, we can shed light on what those are but for now hopefully you can figure it out on your own!

And next time I would suggest putting this question in the right place. Putting a Python question in a Javascript section could get confusing for moderators or help deskers :smiley:


thanks so much I figured it out!. I feel incredibly stupid right now.
I also didn't realize I posted this in a JavaScript page (oops).
again thanks so much you have been a great help.


No problem! Glad to be of service and happy coding! :smiley:


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