Why this code is getting an error message

print "You've just entered the clinic!"
print "Do you take the door on the left or the right?"
answer = raw_input("Type left or right and hit 'Enter'.").lower()
if answer == "left" or answer == "l":
    print "This is the Verbal Abuse Room, you heap of parrot droppings!"
elif answer == "right" or answer == "r":
    print "Of course this is the Argument Room, I've told you that already!"
    print "You didn't pick left or right! Try again."

This error message is displayed.

File "python", line 2
print "Do you take the door on the left or the right?"
IndentationError: unexpected indent


I just tried this in a different lesson and it worked fine. What lesson are you using? The error could have something to do with what lesson you are on.


Lesson:Conditionals & Control Flow
Part:1)Go With the Flow


I just went to this lesson and tried that code with left and right. It worked fine. Maybe it has something to do with the way you copied the code onto this discussion. Possibly i got your code without an indent?


K Thanks for the help


did you get it to work?


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