Answer: This is the simplest rock paper scissor game that a beginner in python can understand:
******************************************************************************************
import sys #sys module is for exit function in line 8
import random
import time
print("Hi!,Welcome to TEENS Rock paper,scissor,game")
name = str(input("What's Your Name? -"))
print("HI",name,"!")
age = float(input(" Please Enter your Age :"))
if age < 13:
sys.exit('You are not eligible as you are not a Teenager.')
else :
input("can we start the game? :")
rules = str(input("Do you know the rules of the game?:"))
if rules == 'no':
print(" RULES: An easily memorised rule determines the winner: “Rock breaks scissors, scissors cuts paper, paper covers rock.”\\ In other words, a player who chooses rock beats one who chooses scissors; scissors in turn beats paper; paper beats rock. This yields a winner whenever the two players choose differently.")
print("\\Loading..") #remember to Continue the game also after here
elif rules =='yes':
print("Loading..")
time.sleep(1)
print("processing..")
time.sleep(1)
print("bringing Papers,scissors,Rocks...")
print("_____________________________________________")
CHOICES = ['rock','paper','scissor']
userchoice = str(input("What is your Choice [rock,paper,scissor]? : "))
compchoice = random.choice(CHOICES)
print("Computer's Choice=",compchoice)
if userchoice == compchoice:
print("DRAW!")
print("Compchoice:",compchoice)
time.sleep(2)
elif userchoice == 'paper' and compchoice == 'rock':
print("Paper Covers Rock!!" )
print(name,"Wins !!")
elif userchoice == 'rock' and compchoice == 'paper':
print("Paper Covers Rock!!" )
print("Computer Wins !!")
elif userchoice == 'paper' and compchoice == 'scissor':
print("scissor Cuts paper!!" )
print("Computer Wins !!")
elif userchoice == 'scissor' and compchoice == 'paper':
print("scissor Cuts paper!" )
print(name,"Wins !!")
elif userchoice == 'rock' and compchoice == 'scissor':
print("Rock breaks scissor!" )
print(name,"Wins !!")
elif userchoice == 'scissor' and compchoice == 'rock':
print("Rock breaks scissor!" )
print("Computer Wins !!")
userchoice = str(input("What is your Choice [rock,paper,scissor]? : "))
compchoice = random.choice(CHOICES)
print("Computer's Choice=",compchoice)
if userchoice == compchoice:
print("DRAW!")
print("Compchoice:",compchoice)
time.sleep(2)
elif userchoice == 'paper' and compchoice == 'rock':
print("Paper Covers Rock!!" )
print(name,"Wins !!")
elif userchoice == 'rock' and compchoice == 'paper':
print("Paper Covers Rock!!" )
print("Computer Wins !!")
elif userchoice == 'paper' and compchoice == 'scissor':
print("scissor Cuts paper!!" )
print("Computer Wins !!")
elif userchoice == 'scissor' and compchoice == 'paper':
print("scissor Cuts paper!" )
print(name,"Wins !!")
elif userchoice == 'rock' and compchoice == 'scissor':
print("Rock breaks scissor!" )
print(name,"Wins !!")
elif userchoice == 'scissor' and compchoice == 'rock':
print("Rock breaks scissor!" )
print("Computer Wins !!")
userchoice = str(input("What is your Choice [rock,paper,scissor]? : "))
compchoice = random.choice(CHOICES)
print("Computer's Choice=",compchoice)
if userchoice == compchoice:
print("DRAW!")
print("Compchoice:",compchoice)
time.sleep(2)
elif userchoice == 'paper' and compchoice == 'rock':
print("\tPaper Covers Rock!!" )
print("\t",name,"Wins !!")
elif userchoice == 'rock' and compchoice == 'paper':
print("\tPaper Covers Rock!!" )
print("\tComputer Wins !!")
elif userchoice == 'paper' and compchoice == 'scissor':
print("\tscissor Cuts paper!!" )
print("\tComputer Wins !!")
elif userchoice == 'scissor' and compchoice == 'paper':
print("\tscissor Cuts paper!" )
print("\t",name,"Wins !!")
elif userchoice == 'rock' and compchoice == 'scissor':
print("\tRock breaks scissor!" )
print(name,"Wins !!")
elif userchoice == 'scissor' and compchoice == 'rock':
print("Rock breaks scissor!" )
print("Computer Wins !!")
print("\\\\\t\a GameOver !!")
print("\\\\\t\aThank you For playing !!")