Check Yourself!


print 'Welcome to the Pig Latin Translator!'

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

this shows in the compiler  File "python", line 7
SyntaxError: invalid syntax


Your else statement should be on the same indentation level as your if statement,

if condition:
    # code
    # code
    # code


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