Day 3 focused on basic control flow with; if/elif statements, nested if statements, and logical operators.
My project for the day was to make a simple choose your own adventure game, here is the result! As always the project is linked in replit if you want to try it out
My project for the day was to make a simple choose your own adventure game, here is the result! As always the project is linked in replit if you want to try it out
print(''' ******************************************************************************* | | | | _________|________________.=""_;=.______________|_____________________|_______ | | ,-"_,="" `"=.| | |___________________|__"=._o`"-._ `"=.______________|___________________ | `"=._o`"=._ _`"=._ | _________|_____________________:=._o "=._."_.-="'"=.__________________|_______ | | __.--" , ; `"=._o." ,-"""-._ ". | |___________________|_._" ,. .` ` `` , `"-._"-._ ". '__|___________________ | |o`"=._` , "` `; .". , "-._"-._; ; | _________|___________| ;`-.o`"=._; ." ` '`."\` . "-._ /_______________|_______ | | |o; `"-.o`"=._`` '` " ,__.--o; | |___________________|_| ; (#) `-.o `"=.`_.--"_o.-; ;___|___________________ ____/______/______/___|o;._ " `".o|o_.--" ;o;____/______/______/____ /______/______/______/_"=._o--._ ; | ; ; ;/______/______/______/_ ____/______/______/______/__"=._o--._ ;o|o; _._;o;____/______/______/____ /______/______/______/______/____"=._o._; | ;_.--"o.--"_/______/______/______/_ ____/______/______/______/______/_____"=.o|o_.--""___/______/______/______/____ /______/______/______/______/______/______/______/______/______/______/_____ / ******************************************************************************* ''') print("Welcome to Treasure Island.") print("Your mission is to find the treasure.") crossroad = input("You\'re at a cross road. Where do you want to go? Type "'left'" or "'right'" \n") if crossroad.lower() == "right": lake = input("You\'ve come to a lake. There is an island in the middle of the lak. Type "'wait'" to wait for a boat. Type "'swim'" to swim across.\n").lower() if lake == "wait": color = input("You arrive at the island unharmed there are three doors, one red one blue, and one yellow. Which color do you choose?\n").lower() if color == "red": print("When you steop into the room you fall into a bottomless pit. Game Over") elif color == "blue": print("The room locks behind you and you are attacked by killer teddy bears. Game Over") elif color == "yellow": print("You have found the treasure. You win!") else: print("As you swim across, a pack of man eating otters attack you. Game Over") else: print("You have walk down road left of the fork where waiting for you is a honey badger, it eats your face off and you lose.")