Stuck on Python: Pyg Latin


#1



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


print 'Welcome to the Pig Latin Translator!'

Start coding here!

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


File "python", line 7
else:
^
SyntaxError: invalid syntax


Replace this line with your code.


#2

The colon ( : ) after your print statement does not belong.

Also, the print statement above is not actually printing anything.


#3

Still same error msg

print 'Welcome to the Pig Latin Translator!'

Start coding here!

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


#4

At the top of the message window there is an icon that looks like < / >. Can you copy and paste your code inside there so that I can see how it is formatted?


#5

print 'Welcome to the Pig Latin Translator!'

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

#6

Your else statement needs to be lined up with the if statement.


#7

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