'''Python Programming Challenge'''
print('''INFO SECTION:
1.Chose the variable as per given below in the Discription
2.To play again and again Rerun the code\n''')
print("\n******************WELCOME TO ROCK PAPER SCISSOR GAME***************\n")
import random
def gameWin(comp,you):
#if both choose same its a tie
if(comp==you):
return None
elif(comp=='R'):
if(you=='S'):
return False
elif(you=='P'):
return True
elif(comp=='P'):
if(you=='R'):
return False
elif(you=='S'):
return True
elif(comp=='S'):
if(you=='P'):
return False
elif(you=='R'):
return True
pass
print("Computer's will choose R for Rock\n\t\tP for Paper\n\t\tS for Scissor")
randno=random.randint(1,3)
if(randno==1):
comp='R'
elif(randno==2):
comp='P'
elif(randno==3):
comp='S'
you=input("Your Turn: Chose R for Rock\n\t\tP for Paper\n\t\tS for Scissor\n")
a=gameWin(comp,you)
print(f"Computer chose : {comp}")
print(f"You chose : {you}")
if(a==None):
print("The game is a tie between You and Computer")
elif a:
print("You win!!! Whuhuuu Enjoy")
else :
print("You lose. Better luck next Time")
print("\n******************************GAME ENDS****************************\n")