Dr. Angela의 100일 간의 코드 Python 부트캠프 중 03일차
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.")
stage1 = input("You're at a crossroad.
Where do you want to go? Type \"left\" or \"right\"").lower()
if stage1 == "left":
stage2 = input("You've 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.").lower()
if(stage2 == "wait"):
stage3 = input("""You arrive at the island unharmed.
There is a house with 3 doors. One red, one yellow
and one blue. Which colour do you choose?""").lower()
if(stage3 == "red"):
print("It's a room full of fire. Game Over.")
elif(stage3 == "yellow"):
print("You Win!")
elif(stage3 == "blue"):
print("You enter a room of beasts. Game Over.")
else:
print("GAMEOVER")
elif(stage2 == "swim"):
print("You get attacked by an angry trout. Game Over.")
else:
print("You get attacked by an angry trout. Game Over.")
elif(stage1 == "right"):
print("You fell into a hole. Game Over.")
else:
print("You fell into a hole. Game Over.")
순서도:
산출:
Reference
이 문제에 관하여(Dr. Angela의 100일 간의 코드 Python 부트캠프 중 03일차), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://dev.to/junohegel/day-03-of-100-days-of-code-python-bootcamp-by-dr-angela-2nk5텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)