-
Notifications
You must be signed in to change notification settings - Fork 0
/
choose_your_own_adventure.py
31 lines (28 loc) · 1.49 KB
/
choose_your_own_adventure.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
name = input("Type your name: ")
print("Welcome", name.capitalize(), "to this adventure!")
answer = input("You are on a dirt road, it has come to an end and you can go left or right. Which way would you like to go? ").lower()
if answer == "left":
answer = input("You can come to a river, you can walk around it or swim across? Type walk to walk around it or swim to swim across: ").lower()
if answer == 'swim':
print("You swam across and were eaten by an alligator.")
elif answer == 'walk':
print("You walked for many miles, ran out of water and you lost the game.")
else:
print("Not a valid option. You lose.")
elif answer == "right":
answer = input("You have arrived at a bridge, but it looks wobbly, do you still wish to cross it or head back (cross/back)?").lower()
if answer == 'back':
print("You go back and lose. Sorry.")
elif answer == 'cross':
answer = input("You cross the bridge and meet a stranger. Do you want to talk to them? (Yes/No) ").lower()
if answer == 'yes':
print("You talk to the stranger and you receive gold from them. Hurray you WIN!! ")
elif answer == 'no':
print("You ignored the stranger and they are offended and you lose. Sorry, but you sometimes you need to trust people.")
else:
print("Not a valid option. You lose.")
else:
print("Not a valid option. You lose.")
else:
print("Not a valid option. You lose.")
print("Thank you for trying", name)