diff --git a/003/Treasure+Island+Flowchart+(pdf).pdf b/003/Treasure+Island+Flowchart+(pdf).pdf new file mode 100644 index 0000000..dab42f0 Binary files /dev/null and b/003/Treasure+Island+Flowchart+(pdf).pdf differ diff --git a/003/task.py b/003/task.py new file mode 100644 index 0000000..f3ae9c1 --- /dev/null +++ b/003/task.py @@ -0,0 +1,18 @@ +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.") \ No newline at end of file