-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathadventure_game.py
37 lines (24 loc) · 977 Bytes
/
adventure_game.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
32
33
34
35
36
37
name = input("hey type your name: ")
# print("hello",name,"welcome to my game!")
print("hello "+ name +" welcome to my game!")
should_we_play= input("do you wanna play? ").lower()
play = should_we_play == "yes" or should_we_play == "y"
# print(play)
if play:
print("we are gonna play!")
direction= input("do you wanna go left or right? ") .lower()
if direction== "left":
print('you went left and fell off the cliff, game over, try again')
elif direction== "right":
choice= input(
"""okay, now you see a bridge,
do you wanna swin under it or cross it? (swim/cross) """
)
if choice == "swim":
print("you got eaten by an alligator, you die, the end")
else:
print("you found gold and you won")
else:
print("Sorry, not valid reply, You die!")
else:
print ("we are not playing...")