Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Create a new Python program and save it in your Prac 9 directory. In its original form, each of the two players simultaneously chooses one
Create a new Python program and save it in your Prac directory.
In its original form, each of the two players simultaneously chooses one of rock, scissors or paper. Rock beats scissors, paper beats rock and scissors beats paper. If both players choose the same, it is a draw.
You will create a program to play the game, human against computer. The human player will select one of three options: Rock, Scissors or Paper. The computer will then make its choice randomly using the random number generator. The computer also decides and displays who has won for example, by displaying one of these messages: "I win", "You win", "Draw"
After you generate a random number for the computer's choice, you will need to use some if statements to decide which word to display.
To decide who has won, you will need to use some ifelse statements!
a Write the pseudocode for the game and then get a demonstrator to check your pseudocode before going on to the next step.
b Now create the program using your pseudocode.
c Test the program with different inputs to make sure the results are what you expect.
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