Indentation error in pyglatin


#1



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


File "python", line 5
if len(original) > 0:
^
IndentationError: unexpected indent


print 'Welcome to the Pig Latin Translator!'

original = raw_input("Enter a word:")
print original
    if len(original) > 0:
        #Run this block.
        #Maybe print something?
    else:
         print empty


#2

The error message is pretty self explanatory, you indents are wrong, also part of your code seems to be out of order, it should be like this:

print 'Welcome to the Pig Latin Translator!'

original = raw_input("Enter a word:")
if len(original) > 0:
    print original
        #Run this block.
        #Maybe print something?
else:
    print empty

That should do it for you. Hope that helps! :slight_smile: Message me if you need more help after that.

-- @chipjumper36731


#3

thank you received output. i forgot to include print original..


#4

You're welcome. Glad to help! :slight_smile:


#5

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