You are on page 1of 5

QUESTION 3

You are tasked with creating a rock paper scissors game/ match where
the player will play against the computer. The game will run automatically
until the player wins 5 times with the same choice.

eg,
If the player pics rock, the game will store that choice and use it every
round while the computer will have different random choices each round.

In order for the user to win the match, he needs to defeat the computer
5 times.

3.1 Write a code that will execute the above statement and display the
outcome in this manner:

'The player has chosen Rock.'


Round 1 computer chose paper
Round 2 computer chose Scissors
Round 3 computer chose paper
Round 4 computer chose Scissors
Round 5 computer chose Rock
Round 6 computer chose Rock
Round 7 computer chose Scissors
Round 8 computer chose Scissors
Round 9 computer chose paper
Round 10 computer chose Scissors

'The player has won the match after 10 Rounds'

You might also like