What is Rock Paper Scissor game?
Rock paper scissor game is hand game played between two players ,in each player at the same time forms one of three shapes.
Rock Paper Scissor game in python
When we want to rock paper scissor game with computer what we do for this
we make a computer program with the help of python .
LETS START CODING
We use while loop to play game five times after that calculate the points of both user and computer then print the winner and there points.
In this game we take 1 for stone, 2 for paper, 3 for scissor.
Import random
We have to import random module to generate the computer choice. simply ,we have to write import random to import random module.
Taking user input
For taking user input we have to write int(input("Enter your play:"))
MAKING COMPUTER CHOICE
For computer choice we have to write random.randint(1,3)
GAME CONDITION
For game condition and determine winner we have to use IF ,ELSE condition .
After while loop complete we calculate the points of user and computer and print the winner and there points.
HERE ARE THE CODE OF GAME
OUTPUT