print("Welcome to Treasure Island.\nYour mission is to find the Treasure. ")
choice_1=input('You are at a cross road. Where do you want to go? Type "left" or "right"')
if choice_1=="left":
choice_2=input('You have come to a lake. There is an island in the middle of the lake. Type "wait" to wait for a boat. Type "swim" to swim across')
if choice_2=="wait":
choice_3=input('You arrive at the island unharmed. There is a house with 3 doors. One "red", one "yellow and one "blue". Which color do you choose? ')
if choice_3== "red":
print("It's a room full of fire. Game Over.")
elif choice_3=="yellow":
print("You found the treasure! You Win!")
elif choice_3=="blue":
print("You enter a room of beasts. Game Over.")
else:
print("You chose a door that doesn't exist. game over.")
else:
print("You get attacked by an angry trout. Game Over.")
else:
print("You fell into a hole. Game Over.")
Hi @PrakashSaravan2 , welcome to the forums!
You can press 2 spaces or 1 TAB key for 1 indentation level. This is the default settings.
Hope this helps!
2 Likes
line 6 has an extra space at the start which you must remove to align it with the rest of the if choice_2…
block
3 Likes