Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Problem 2: Write a program to play the simple game Rock-Paper-Scissors (RPS), with the user playing against the computer Rock In a non-computerized version of
Problem 2: Write a program to play the simple game Rock-Paper-Scissors (RPS), with the user playing against the computer Rock In a non-computerized version of the game, two players would stand face to face and, at the count of three, each displays a hand gesture - one of the three shown at the right, representing a rock, paper or scissors. Paper The winner is declared based on the following simple rules: Scissor Rock breaks scissors rock wins .Scissors cut Paper - scissors win . Paper covers Rock paper wins ueJ: Terminal Window-RPS In your version of RPS, the program wil allow multiple games to be played. The user will be playing against the computer The user's guess will be an input value, while computer's guess will be chosen randomly Let's play Your turn (ROCK-1, PAPER-2, SCISSORS-3): 2 I picked ROCK, you win! Play again (y)? y Let's play.. Your turn (ROCK , PAPER 2, SCISSORS 3):2 I picked SCISSORS I win! The result of each game should be displayed Play again (y)? y When the user is tired and doesn't want to play any more games, the program should display the following statistics: Let's play. Your turn (ROCK-1, PAPER-2, SCISSORS 3): 1 I picked SCISSORS you win! Play again (y)? y o The number of user wins o Number of user losses o Number of ties Let's play Your turn (ROCK 1, PAPER2, SCISSORS 3): 2 I picked SCISSORS I win! Play again (y)? y A sample run is shown on the left. Let's play Your turn (ROCK 1, PAPER 2, SCISSORS 3): 1 I picked ROCK, we tied! Play again (y)? n Here are the stats: You won 2 times You lost 2 times We tied 1 times That was fun!! HINT: Try to come up with a boolean expression that defines the conditions for a user's win
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started