Please, use basic syntax, I am newbie. Such as while loop, if else etc. Create a program called RockPaperScissors . Write a program that allows
Please, use basic syntax, I am newbie. Such as while loop, if else etc.
Create a program called RockPaperScissors.
Write a program that allows the user to play the Rock-Paper-Scissors game against the computer.
The game rules are as follows:
Rock crushes Scissors
Paper covers Rock
Scissors cuts Paper
The program should to the following:
Welcome the user to the game.
Randomly generate a number between 1 and 3; 1 will represent Rock, 2 will represent Paper, 3 will represent Scissors.
Prompt the user for a value between 1 and 3 to represent their choice.
Display the results of that round and whether the computer or the user won that round.
Display the current score.
Repeatedly play the game until either the user or the computer wins three rounds.
Display a final message containing the overall winner of the game.
Requirements:
The welcome message should only display when the program first starts. It should not display during each round.
When incrementing the number of wins for either the computer or the user, you must use the increment operator.
When determining who won the round, you must use a switch statement.
You may either use a while loop or a do-while loop in your program for the repetition. The choice is yours to make.
Output: You can use the sample run below as guidance for generating your interaction with the user.
Sample Run (This is one run of the program):
WELCOME TO ROCK/PAPER/SCISSORS!!!! I will SLAUGHTER you!!!!
1-Rock
2-Paper
3-Scissors
Pick your weapon: 1
Rock crushes Scissors. You win!
Score: Me - 0 You - 1
1-Rock
2-Paper
3-Scissors
Pick your weapon: 3
It's a tie...
Score: Me - 0 You - 1
1-Rock
2-Paper
3-Scissors
Pick your weapon: 3
Scissors cuts Paper. You win!
Score: Me - 0 You - 2
1-Rock
2-Paper
3-Scissors
Pick your weapon: 2
It's a tie...
Score: Me - 0 You - 2
1-Rock
2-Paper
3-Scissors
Pick your weapon: 1
Paper covers Rock. I win!
Score: Me - 1 You - 2
1-Rock
2-Paper
3-Scissors
Pick your weapon: 2
Scissors cuts Paper. I win!
Score: Me - 2 You - 2
1-Rock
2-Paper
3-Scissors
Pick your weapon: 3
It's a tie...
Score: Me - 2 You - 2
1-Rock
2-Paper
3-Scissors
Pick your weapon: 2
Paper covers Rock. You win!
Score: Me - 2 You - 3
CURSES! I'LL GET YOU NEXT TIME!!!
Step by Step Solution
There are 3 Steps involved in it
Step: 1
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