-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtreasureIsland.py
31 lines (22 loc) · 944 Bytes
/
treasureIsland.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#Treasure Island Code
print("Welcome to Treasure Island. \nYour mission is to find the treasure")
road = input("You're at a cross road. where do you want to go? Type 'left' or 'right'?")
road = road.lower()
if road == "right":
print("Game Over.")
elif road == "left":
lake = input("You come to lake. There is an island in the middle of the lake. Type 'wait' to wait for a boat. "
"Type 'swim' to swim across?")
lake = lake.lower()
if lake == "swim":
print("Game Over")
elif lake == "wait":
door = 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?")
door = door.lower()
if door == "red":
print("Game Over")
elif door == "blue":
print("Game Over")
elif door == "yellow":
print("You win!!")