Question
RAPTOR Flowchart Task: Create a modularized Rock, Paper, and Scissors game that lets user play 7 Rock, Paper, and Scissors game against computer. The program
RAPTOR Flowchart Task: Create a modularized Rock, Paper, and Scissors game that lets user play 7 Rock, Paper, and Scissors game against computer. The program should display each game's result and the final result for the 7 games. The program should contain the following procedures:
- getComputerChoice receives nothing but returns a word randomly picked from Rock, Paper, and Scissors.
- getUserChoice receives nothing but returns a word user picked from Rock, Paper, and Scissors.
- play receives computerPicked and userPicked and returns winner's name, computer or user.
- main: call the above procedures 7 times, display each game's result, and final result summary.
Game rule: Paper wins Rock, Rock wins Scissors, and Scissors wins Paper.
Here is a sample output:
Computer User Winner
Game 1 Paper Rock Computer
Game 2 Paper Scissors User
Game 3 Rock Rock Tie
Game 4 Scissors Rock User
Game 5 Rock Scissors Computer
Game 6 Scissors Rock User
Game 7 Paper Paper Tie
--------------------------------------------------------------------------------------------------------------
Total Games Played: 7
User Won: 3 times
Computer won: 2 times
Tied: 2 times
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