Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hello consider python while answering this question, please: And here is the correct output: Write a program that lets the user play the game of

Hello consider python while answering this question, please:

image text in transcribed

And here is the correct output:

image text in transcribed

Write a program that lets the user play the game of Rock, Paper, Scissors against the computer. The program should work as follows. 1. When the program begins, a random number in the range of 1 through 3 is generated. If the number is 1, then the computer has chosen rock. If the number is 2, then the computer has chosen paper. If the number is 3, then the computer has chosen scissors. (Don't display the computer's choice yet.) 2. The user enters his or her choice of "rock", "paper", or "scissors" at the keyboard. 3. The computer's choice is displayed 4. A winner is selected according to the following rules: If one player chooses rock and the other player chooses scissors, then rock wins. (The rock smashes the scissors.) If one player chooses scissors and the other player chooses paper, then scissors wins. (Scissors cuts paper.) one player chooses paper and the other player choses rock,then paper wins (Paper wrapsrock If both players make the same choice, the game must be played again to determine the winner. Python 3.6.3 Shell File Edit Shell Debug Options Window Help Python 3.6.3 (v3.6.3:2c5fed, Oct 3 2017, 18:11:49) MSC v.1900 64 bit (AMD4) on win32 Type "copyright", "credits" or "licenor more information. RESTART: GEO-IBMD Drive\Files_teachingMCCSpring cts\Proj 6\Exercise 5-21 . 2018\PythonlExample Proje Enter 1 for rock, 2 for paper, 3 for scissors:1 Computer chose rock tou chose rock You made the same choice as the computer. Starting over Enter 1 for rock, 2 for paper, 3 for scissors: 2 Computer chose rock You chose paper You win the game Ln: 8 Col:0 Write a program that lets the user play the game of Rock, Paper, Scissors against the computer. The program should work as follows. 1. When the program begins, a random number in the range of 1 through 3 is generated. If the number is 1, then the computer has chosen rock. If the number is 2, then the computer has chosen paper. If the number is 3, then the computer has chosen scissors. (Don't display the computer's choice yet.) 2. The user enters his or her choice of "rock", "paper", or "scissors" at the keyboard. 3. The computer's choice is displayed 4. A winner is selected according to the following rules: If one player chooses rock and the other player chooses scissors, then rock wins. (The rock smashes the scissors.) If one player chooses scissors and the other player chooses paper, then scissors wins. (Scissors cuts paper.) one player chooses paper and the other player choses rock,then paper wins (Paper wrapsrock If both players make the same choice, the game must be played again to determine the winner. Python 3.6.3 Shell File Edit Shell Debug Options Window Help Python 3.6.3 (v3.6.3:2c5fed, Oct 3 2017, 18:11:49) MSC v.1900 64 bit (AMD4) on win32 Type "copyright", "credits" or "licenor more information. RESTART: GEO-IBMD Drive\Files_teachingMCCSpring cts\Proj 6\Exercise 5-21 . 2018\PythonlExample Proje Enter 1 for rock, 2 for paper, 3 for scissors:1 Computer chose rock tou chose rock You made the same choice as the computer. Starting over Enter 1 for rock, 2 for paper, 3 for scissors: 2 Computer chose rock You chose paper You win the game Ln: 8 Col:0

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

Visual Basic6 Database Programming

Authors: John W. Fronckowiak, David J. Helda

1st Edition

ISBN: 0764532545, 978-0764532542

More Books

Students also viewed these Databases questions

Question

What is emerging adulthoodpg12

Answered: 1 week ago