Files
python_bootcamp/003/task.py
Tanguy Deleplanque df845a95cf day 3
2025-06-10 15:15:59 +02:00

18 lines
565 B
Python

print("Welcome to Treasure Island.\nYour mission is to find the treasure.")
if input("left or right?\n").lower() != "left":
exit("Fall into a hole.\nGame over")
if input("swim or wait?\n").lower() != "wait":
exit("Attacked by trout.\nGame Over.")
last_choice = input("there are three doors: red, blue, yellow. which do you pick\n").lower()
if last_choice == "red":
exit("Burned by fire.\nGame Over.")
elif last_choice == "yellow":
exit("You win!")
elif last_choice == "blue":
exit("Eaten by beasts.\nGame Over.")
else:
exit("Game over.")