DEV Community

Cover image for My #100daysOfCode Challenge - Python 100 projects in 100 days - Journal Entry - Day 3
Anthony Beckford🚀
Anthony Beckford🚀

Posted on

My #100daysOfCode Challenge - Python 100 projects in 100 days - Journal Entry - Day 3

Day 3 - Treasure Island

print('''


      |                   |                  |                     |
Enter fullscreen mode Exit fullscreen mode

______|__________.="";=._________|_______________|____
| | ,-",="" `"=.| |
|
_________________|"=._o`"-. "=.______________|___________________
|
"=.o`"=. `"=. |
______|_______________:=._o "=.."_.-="'"=._____________|____
| | .--" , ; `"=.o." ,-"""-. ". |
|
______________|." ,. . , `"-."-._ ". '|___________________
| |o"=._ , "; .". , "-."-.; ; |
______|_____| ;-.o"=.; ." '."` . "-._ /__________|____
| | |o; "-.o"=. '` " ,.--o; |
|
_______________|| ; (#) -.o"=.`_.--"_o.-; ;|__________________
_///|o;._ " `".o|o_.--" ;o;_///_
/___///"=.o--. ; | ; ; ;/_///
__
/___//__/"=._o--. ;o|o; .;o;_///_
/___////"=._o.; | ;.--"o.--"/___///
__
/___////"=.o|o_.--""/__///_
/___//////////__ /


''')
question1 = input('You\'re at a cross road. Where do you want to go? Type "left" or "right" ')
question1_lowercase = question1.lower()
if question1_lowercase == "left":
question2 = input('You come to a lake. There is an island in the middle of the lake. Type "wait" to wait for a boat. Type "swim" to swim across ')
question2_lowercase = question2.lower()
if question2_lowercase == "wait":
question3 = input('You arrive at the island unharmed. There is a house with 3 doors. One red, one yellow and one blue. Which door do you choose? Type "red", "yellow" or "blue" ')
question3_lowercase = question3.lower()
if question3_lowercase == "yellow":
print("You Win!")
else:
print("Game Over.")
else:
print("Game Over.")
else:
print("Game Over.")

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

Key Takeaways:

  1. Learned about Conditional Statements
  2. Logical Operators
  3. Code Blocks and Scope

Top comments (1)

Collapse
 
aba23 profile image
Aba23

'''print(''' �
una
cosa
davvero
incredibi
le:ho usato
tutto il fasc
ino non indiffe
rente di cui disp
ongo; le ho portato
fiori senza risparmia
re denari - tecnica che
ha sempre effetto sui cuo
ri delle fanciulle. ho fa
tto tutto ci� che potevo
e di solito ci� funzion
a. ma giunti al dunqu
e mi ha
r
i
s
posto...
''')
print("Welcome to Albero di Natale.")
print("Your mission is to find the lucky ornament.")

direction = input('You\'re here. Where do you wanna go? Type "left" or "right"?\n').lower()
if direction == "left":
#continues the game
character = input('You\'ve made the right choice, not literally though :p. Which do you prefer? Type "Santa" or "Grinch"?\n').lower()
if character == "santa":
#continues the game
color = input('You\'ve been a good girl. Do you like gifts? Choose your gift typing its color. Type "purple" or "mint" or "red"\n').lower()
if color == "red":
#positive ending
print("Here's your Christmas gift. Enjoy")
else:
#negative ending
print("Game over. No gift for you. Red is the only christmas color")
else:
print("Game over. Grinch is bad, not as in badass")
else:
print("Game over. Santa does not exist")'''