-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgame.py
More file actions
27 lines (27 loc) · 690 Bytes
/
Copy pathgame.py
File metadata and controls
27 lines (27 loc) · 690 Bytes
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
'''
1 for sanke
-1 for water
0 for gun
'''
import random
computer=random.choice(["snake", "water", "gun"])
you=input("enter your choice=")
print(f"computer choice={computer}")
print(f"your choice={you}")
if computer==you:
print("tie")
else:
if computer=="snake" and you=="water":
print("you win")
elif computer=="water" and you=="snake":
print("you win")
elif computer=="water" and you=="gun":
print("you win")
elif computer=="gun" and you=="water":
print("you win")
elif computer=="gun" and you=="snake":
print("you win")
elif computer=="snake" and you=="gun":
print("you win")
else:
print("you lose")