Why this code is getting an error message


#1
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!"
else:
    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


#2

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.


#3

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


#4

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?


#5

K Thanks for the help


#6

did you get it to work?


#7

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