# Project 1 : Snake, Water, Game OR Rock,Paper,Scissor
import random
def game(comp,you):
if comp==you:
return 2
elif comp=="s":
if you=="w":
return 0
elif you=="g":
return 1
elif comp=="w":
if you=="g":
return 0
elif you=="s":
return 1
elif comp=="g":
if you=="w":
return 0
elif you=="s":
return 1
print("Computer turn : Snake(s),Water(w) or Gun(g)")
randno=random.randint(1,3)
if randno==1:
comp="s"
elif randno==2:
comp="w"
elif randno==3:
comp="g"
you=input("Your Turn : Snake(s),Water(w) or Gun(g) : ")
a=game(comp,you)
print(f"Computer Choose {comp}")
print(f"You Choose {you}")
if a==2:
print("Match is tie")
elif a==1:
print("You Win")
else:
print("You Loose")