Check yourself


At the bottom of the page, I get this error message: "Oops! did you accidentally delete the variable called original?
and on the box to the right, this is the error message I get. File "python", line 7
print original
IndentationError: expected an indented block

Replace this line with your code. 
print 'Welcome to the Pig Latin Translator!'

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


You are overwriting the input you have above with an empty string :open_mouth:

Indents are important here. When something is nested in something else, it needs to be indented such as,

if s == "foo":
    print s
    print "foo foo"

#3 thank you. I got carried away.


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