if room == "middle":
print("Actions available: forward, backward, look")
action = input("> ")
if action == "forward":
room = "end"
elif action == "backward":
room = "start"
else:
room = "middle"
This is the output:
Output:
Actions available: forward, look
> look
You are standing at the entrance to a long tunnel.
Actions available: forward, look
> forward
You are in the depths of the tunnel.
Actions available: forward, backward, look
> backward
You are standing at the entrance to a long tunnel.
Actions available: forward, look
> forward
You are in the depths of the tunnel.
Actions available: forward, backward, look
> look
You are in the depths of the tunnel.
Actions available: forward, backward, look
> forward
You have escaped the tunnel. You win!
I am currently studying Grok The Dark Tunnel (Python)
Hour of Code: The Dark Tunnel, spent quiet some time, if anyone is able to point out what i am missing or misplaced please help, iv been getting so many syntax errors I really need your help guys !

if room == "You are in the depths of the tunnel.":
print("Actions available: forward, backward, look")
action = input("> ")
if action == "forward":
room = "You have escaped the tunnel. You win!"
elif action == "backward":
room = "You are standing at the entrance to a long tunnel."
print('Actions available: forward, backward, look')
action = input("> ")
else: "forward"
room = "You are in the depths of the tunnel."
print('You have escaped the tunnel. You win!')
Error:
File "program.py", line 10
else: "forward"
^
SyntaxError: invalid syntax
Output:
Actions available: forward, look
> forward
You are in the depths of the tunnel.
Actions available: forward, backward, look
> forward
You have escaped the tunnel. You win!
Output:
Actions available: forward, look
> look
You are standing at the entrance to a long tunnel.
Actions available: forward, look
> forward
You are in the depths of the tunnel.
Actions available: forward, backward, look
> backward
You are standing at the entrance to a long tunnel.
Actions available: forward, look
> forward
You are in the depths of the tunnel.
Actions available: forward, backward, look
> look
You are in the depths of the tunnel.
Actions available: forward, backward, look
> forward
You have escaped the tunnel. You win!
So.. I am starting to get the hang of this forum messaging protocols and I like how it just makes everything organized. So This is what I got after hours of head scratching ! Lol *Edit, the python feature is not showing up ?
isnt working
The spacing is wrong. Lines 8-9 end the if statement, so the else is seen as a lone else statement with no if to relate to. Either move lines 8-9 up into the elif statement, or move them after the else statement depending on how it is supposed to work
I don't even think what I did was right. I tried following your advice and I'm still confused.. bare with me please I am a newbie

I appreciate your reply! I need to find a solution please
I'll just give you some examples and you can use them to fix your code.
#Here is an if statement
if #Statement
#Code
elif #Statement
#Code
#Code - this code here ends the statement. The if statement will not look past this for anything
else #Python thinks this else is just here with no if to relate to
I hope this helps you see what's wrong with your code
Where i put "#Code", just imagine there is code there and statements where it says "#Statement"