-
Notifications
You must be signed in to change notification settings - Fork 177
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Barbora Benoni
authored and
Barbora Benoni
committed
Oct 30, 2023
1 parent
598afbc
commit 1290793
Showing
2 changed files
with
308 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,154 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "3bc88c7d", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"print(\"Welcome to Treasure Island.\")\n", | ||
"print(\"Your mission is to find the treasure in a castle in Italy.\") \n", | ||
"name=input(\"What is your name, treasure hunter?\\n\")\n", | ||
"\n", | ||
"#https://www.draw.io/?lightbox=1&highlight=0000ff&edit=_blank&layers=1&nav=1&title=Treasure%20Island%20Conditional.drawio#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D1oDe4ehjWZipYRsVfeAx2HyB7LCQ8_Fvi%26export%3Ddownload\n", | ||
"\n", | ||
"#Write your code below this line 👇\n", | ||
"route=input(\"You are standing in front of a cross road. You can turn either left or right. On the right side, there is a dark forest with impenetrable trees. On the left side is a forest from which you can hear horrible noises. Will you go left or right?\\n\")\n", | ||
"route_low=route.lower()\n", | ||
"if route_low ==\"left\":\n", | ||
" boat1=input(\"As you entered the forest, you hear that the noise is getting louder and some figures are getting closer and closer. You cover your ears and almost scream, but then you see that it is only a group of Trick or Treaters. You continue further through the forest. Now you reached a lake, and there is the treasure castle in the middle. You have two possibilities for how to get there. You can either swim there, but you had a snack less than 20 minutes ago, or you wait for a boat, but you are not sure when the next boat is coming. So, swim or boat?\\n\")\n", | ||
" boat_low=boat1.lower()\n", | ||
" if boat_low ==\"boat\":\n", | ||
" which_door=input(\"You chose wisely. You can't count on public transport in Italy, but luckily there are many nice people that want to chat. So, for a small chat with an elderly Italian guy, he is taking you to the island. And you learnt useful information. Like how to prepare a homemade orecchiette. Anyway, you enter the castle, and there are three doors in front of you, each different colour. Now, you have to use your intuition and open the correct one. Otherwise, you might be burnt or eaten by a beast...just saying, no stress. Ehmm... So which door are you going to enter: red, black or yellow?\\n\")\n", | ||
" which_door_low=which_door.lower()\n", | ||
" if which_door_low==\"yellow\":\n", | ||
" print(\"Congratulations! Yellow is like gold, and you found the treasure! This is a bit awkward, but you should actually leave it there. Otherwise, there would be nothing for the other treasure hunters...If it makes you feel better, take some euros for the ride back. There is a bridge behind the castle, and you can just call an Uber. Or ask the old guy if you took his contact. Anyway...ehm... Thanks for playing, hope you enjoyed it!\")\n", | ||
" print('''\n", | ||
"*******************************************************************************\n", | ||
" | | | |\n", | ||
" _________|________________.=\"\"_;=.______________|_____________________|_______\n", | ||
"| | ,-\"_,=\"\" `\"=.| |\n", | ||
"|___________________|__\"=._o`\"-._ `\"=.______________|___________________\n", | ||
" | `\"=._o`\"=._ _`\"=._ |\n", | ||
" _________|_____________________:=._o \"=._.\"_.-=\"'\"=.__________________|_______\n", | ||
"| | __.--\" , ; `\"=._o.\" ,-\"\"\"-._ \". |\n", | ||
"|___________________|_._\" ,. .` ` `` , `\"-._\"-._ \". '__|___________________\n", | ||
" | |o`\"=._` , \"` `; .\". , \"-._\"-._; ; |\n", | ||
" _________|___________| ;`-.o`\"=._; .\" ` '`.\"\\` . \"-._ /_______________|_______\n", | ||
"| | |o; `\"-.o`\"=._`` '` \" ,__.--o; |\n", | ||
"|___________________|_| ; (#) `-.o `\"=.`_.--\"_o.-; ;___|___________________\n", | ||
"____/______/______/___|o;._ \" `\".o|o_.--\" ;o;____/______/______/____\n", | ||
"/______/______/______/_\"=._o--._ ; | ; ; ;/______/______/______/_\n", | ||
"____/______/______/______/__\"=._o--._ ;o|o; _._;o;____/______/______/____\n", | ||
"/______/______/______/______/____\"=._o._; | ;_.--\"o.--\"_/______/______/______/_\n", | ||
"____/______/______/______/______/_____\"=.o|o_.--\"\"___/______/______/______/____\n", | ||
"/______/______/______/______/______/______/______/______/______/______/_____ /\n", | ||
"*******************************************************************************\n", | ||
"''')\n", | ||
" elif which_door_low==\"red\":\n", | ||
" print(\"Seriously? You chose RED?! Even after I mentioned being burnt? E va be. You are lucky that the energy and wood are so expensive, so there is only painting with a fire. But it might be dangerous! So anyway, use your intuition... And check for the hints that the universe (or a programmer) is sending you. Now, if you would close the door and leave. Others might be coming soon.\")\n", | ||
" print('''\n", | ||
" ________________________________________\n", | ||
" [________________________________________]\n", | ||
" ||_|_||_|_|_|_|_|_|_|_|_|_|_|_|_|_|_||\n", | ||
" |_|_|_| | | |_|_|_|\n", | ||
" ||_|_|| | )' | ||_|_||\n", | ||
" |_|_|_| | ), ) | |_|_|_|\n", | ||
" ||_|_|| | , ) , ) | ||_|_||\n", | ||
" |_|_|_| | ( ( , ) , | |_|_|_|\n", | ||
" ||_|_|| | , ,' ) ( , ) | ||_|_||\n", | ||
" |_|_|_| | _)' , ( ' (__ _| |_|_|_|\n", | ||
" ||_|_|| /_)_,)___),_)'_)__(_ \\ ||_|_||\n", | ||
"_____lc|_|_|/)______)_____)______( \\|_|_|_|_____\n", | ||
"\"\"\"\"/______________________________________\\\"\"\"\"\n", | ||
"\"\"\"[________________________________________]\"\"\"\"\n", | ||
"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n", | ||
"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n", | ||
"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n", | ||
"\n", | ||
"\n", | ||
"''')\n", | ||
" else:\n", | ||
" print(\"I knew you would choose the black door! It is not the correct one. Just that you know, there should be a horrible beast behind this door that would tear you apart and eat you... But I am an animal lover, and I can't let them eat whichever junk food. There might be a cat, though. She is going wherever she wants. Cats... in case, just let her pass and close the door behind her. So anyway, Game over.\")\n", | ||
" print('''\n", | ||
" _ ___ _.--.\n", | ||
" \\`.|\\..----...-'` `-._.-'_.-'`\n", | ||
" / ' ` , __.--'\n", | ||
" )/' _/ \\ `-_, /\n", | ||
" `-'\" `\"\\_ ,_.-;_.-\\_ ', \n", | ||
" _.-'_./ {_.' ; /\n", | ||
" {_.-``-' {_/\n", | ||
"\n", | ||
" ''')\n", | ||
" else:\n", | ||
" print(f\"*in your mother voice* {name}, you had food less than 20 minutes ago! You cannot swim with a full stomach! *sound of a slipper whooshing thru the air*.... You got it, Game over. Don't tell me I did not warn you.\")\n", | ||
" print('''\n", | ||
"--- __.....__\n", | ||
"--- / .------.\\\n", | ||
"--- ( \\ \\ \n", | ||
"--- \\ \\ __J_\n", | ||
"---- \\ \\ ,' __`. \n", | ||
"---- \\ `,' =' '=\\\n", | ||
"----- `. `. \\\n", | ||
"------ `. `. \\\n", | ||
"------- `. `-.___.'\\\n", | ||
"------- `-._ /\n", | ||
"-------- `----'\n", | ||
" \n", | ||
"''')\n", | ||
"else:\n", | ||
" print(\"I told you that it is impenetrable. You are now stuck in the branches. You are going to pee yourself. And just to let you know, Game over.\")\n", | ||
" print('''\n", | ||
" .. ........... ............. ........... . ..... ........ .......\n", | ||
" ...... ....................%.... .... ..... .........%............\n", | ||
" .@@@ ........ @@.... @@@@ . ............................ * .....\n", | ||
" ....@@ ..... @ .... @ ............. ....... .....; .... *** .....\n", | ||
" .....\\@\\....@ .... @ ............................. # .. ***** ...\n", | ||
" @@@.. @@@@@ @@@@@@___.. ....... ...%..... ... {###} *******\n", | ||
" ....@-@..@ ..@......@@@\\...... %...... ....... <## ####>********\n", | ||
" @@@@\\...@ @ ........\\@@@@ ..... ...... ....... {###}***********\n", | ||
" ....%..@ @@ /@@@@@ . ....... ...............<###########> *******\n", | ||
" ...... .@-@@@@ ...V...... .... %.......... {#######}******* ***\n", | ||
" ...... . @@ .. ..v.. .. . { } ............<###############>*******\n", | ||
" ......... @@ .... ........ {^^, ....... {## ######}***** ****\n", | ||
" ..%..... @@ .. .%.... . .. ( `-; ... <###################> ****\n", | ||
" . .... . @@ . .... .. _ .. `;;~~ ......... {#############}********\n", | ||
" .... ... @@ ... .. /(______); .. ....<################ #####>***\n", | ||
" . .... ..@@@ ...... ( ( .........{##################}*****\n", | ||
" ......... @@@ .... |:------( ) .. <##########################>**\n", | ||
" @@@@ ....@@@ ... _// ...... \\\\ ...... {### ##############}*****\n", | ||
" @@@@@@@ @@@@@ .. / /@@@@@@@@@ vv <##############################>\n", | ||
" @@@@@@@ @@@@@@@ @@@@@@@@@@@@@@@@@@@ ..... @@@@@@ @@@@@@@ @@@@\n", | ||
" @@@@@@###@@@@@### @@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n", | ||
" @@@@@@@@###@##@@ @@@@@@@@@@@@@@@@@@@@@ @@@@@ @@@@@@@@@@@@@@@@@@@\n", | ||
" @@@@@@@@@@@### @@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@\n", | ||
" -@@@@@@@@@#####@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n", | ||
"\n", | ||
"\n", | ||
"''')\n" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 3 (ipykernel)", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.11.4" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 5 | ||
} |
Oops, something went wrong.