-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGameDev.py
More file actions
33 lines (33 loc) · 741 Bytes
/
GameDev.py
File metadata and controls
33 lines (33 loc) · 741 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
28
29
30
31
32
33
#Snake - Water - Gun
import random
choice = ["Snake" , "Water" , "Gun"]
n = 1
p = 0
cp = 0
while n <= 10 :
a = random.choice(choice)
b = input("Enter Your Choice - Snake / Water / Gun ")
if b == a:
print(n)
n = n + 1
elif b == "Snake" and a == "Water":
print("You Win")
p = p + 1
print("Point" , p)
print(n)
n = n + 1
elif b == "Water" and a == "Gun":
print("You Win")
p = p + 1
print("Point" , p)
print(n)
n = n + 1
elif b == "Gun" and a == "Snake":
print("You Win")
p = p + 1
print("Point" , p)
print(n)
else :
cp = cp + 1
print("You Lose" , cp)
n = n + 1