Check yourself


#1

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

else:
print "empty"

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

your help would be appreciated a lot.


#2

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:


#3

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:


#4

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.


#5

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


#6

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