-
-
Notifications
You must be signed in to change notification settings - Fork 49.6k
Description
import random
l = ["SNAKE","WATER","GUN"]
choice = random.choice(l)
a = 1
your_point = 0
cpu_point = 0
while(True):
if a <=10:
n = str(input("PRESS S FOR SNAKE:\nPRESS W FOR WATER:\nPRESS G FOR GUN:\n:-"))
print("CPU CHOICE IS:\n:-",choice)
if n=="S" and choice=="WATER":
print("YOU GOT 1 POINT")
your_point = your_point + 1
elif n=="W" and choice =="SNAKE":
print("CPU GOT 1 POINT ")
cpu_point = cpu_point + 1
elif n =="W" and choice == "GUN":
print("YOU GOT 1 POINT")
your_point = your_point + 1
elif n =="G" and choice == "WATER":
print("CPU GOT 1 POINT")
cpu_point = cpu_point =1
elif n=="S" and choice =="GUN":
print("CPU GOT 1 POINT")
cpu_point = cpu_point + 1
elif n =="G" and choice =="SNAKE":
print("YOU GOT 1 POINT")
your_point = your_point + 1
elif n =="S" and choice =="SNAKE":
print("BOTH ARE EQUAL SO NO ONE GOT ANY POINT")
elif n =="W" and choice =="WATER":
print("BOTH ARE EQUAL SO NO ONE GOT ANY POINT")
elif n=="G" and choice =="GUN":
print("BOTH ARE EQUAL SO NO ONE GOT ANY POINT")
else:
print("INVALID INPUT PLEASE TRY AGAIN")
else:
break
a = a+1
print("TOTAL POINT OF CPU IS:\n:-",cpu_point)
print("YOUR TOTAL POINT IS:\n:-",your_point)
if your_point > cpu_point:
print("YOU WIN HURRAH!")
else:
print("YOU LOSE")