Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Exercise 3 : Paper, Scissors, Rock Game Create a new Python program and save it in your Prac 9 directory. In its original form, each

Exercise 3: Paper, Scissors, Rock Game
Create a new Python program and save it in your Prac9 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 if-else
statements!
a) Write the pseudo-code for the game and then get a demonstrator to
check your pseudo-code before going on to the next step.
b) Now create the program using your pseudo-code.
c) Test the program with different inputs to make sure the results are what
you expect.Exercise 3: Paper, Scissors, Rock Game
Create a new Python program and save it in your Prac9 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").
ENGEN103
Engineering Computing
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 if-else
statements!
a) Write the pseudo-code for the game and then get a demonstrator to
check your pseudo-code before going on to the next step.
b) Now create the program using your pseudo-code.
c) Test the program with different inputs to make sure the results are what
you expect.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Object Databases The Essentials

Authors: Mary E. S. Loomis

1st Edition

020156341X, 978-0201563412

More Books

Students also viewed these Databases questions

Question

3. Outline the four major approaches to informative speeches

Answered: 1 week ago

Question

4. Employ strategies to make your audience hungry for information

Answered: 1 week ago