4.Check yourself


Replace this line with your code. 

could you help me please? I didn't find my mistake... https://www.codecademy.com/courses/python-beginner-2W5v7/0/4?curriculum_id=4f89dab3d788890003000096#
Thank you a lot in advance!


Please pos your code and not just a link to the exercise :slight_smile: In fact, the code is more important than the link but both included is even better. :smile:


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"




If you want help, do please make sure that we understand your code clearly. So, assuming your indentation is correct -

raw_input("Enter a word:")  // Here and
original = raw_input  // here is your mistake.
if len(original) > 0:
    print original
    print "empty"

You ask for raw_input from user, but do not save it anywhere. So, to fix this, first assign original to raw_input and then ask user for his/her contribution. Like this:

original = raw_input("Enter a word:")
if len(original) > 0:
    print original
    print "empty"

Here, you let your code know that anything user typed in raw_input will be assigned to variable original. And then you use it further in your code.

Happy coding sire!


Thank you very much for your help!


No problem, let the code be with you.


I did the mistake to string original when coding
print "original" when in fact was unstringed.


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