Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

2. Write a program to implement a rock paper scissors game using your algorithm from HW 1. Please do the following: Python 3.7.2 for language

2. Write a program to implement a rock paper scissors game using your algorithm from HW 1.

image text in transcribed

image text in transcribed

Please do the following:

Python 3.7.2 for language

use code block

comment for each line of code

Step1: import random module Step2: Display welcome message and rules of the game play Step 3: set wincount and tetal caunt zero Ste4: Display user selection choice 1. Rock 2. Paper 3. Scissor Step5: If user does not select from options in step 4 generate error message. Ask for re enter until correct choice. Step6: Computer randomly chose's one choice Step7: Comparison .If user choice computer choice print Tie" increment tota count value .If user choice-"paper" and computer choice- "scissor print "Computer Wins" increment total count value .If user choice "paper" and computer choice-rock" print "User Wins" increment win.caunt value and totalcouat value .If user choice -"scissor" and computer choice-rock" print "Computer Wins" increment total.count value .If user choice -"scissor" and computer choice-"paper print "User Wins" increment total count value and win.couat value .If user choice-"rock" and computer choice-"paper" print "Computer Wins increment total count value If user choice -rock" and computer choice-"scissor print "User Wins increment total count value, win.count value Step 8: Choice for game continue or quit. If user selects continue, repeat from step 4 Otherwise print user wins against total play and end message

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_2

Step: 3

blur-text-image_3

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

Transactions On Large Scale Data And Knowledge Centered Systems Xxiv Special Issue On Database And Expert Systems Applications Lncs 9510

Authors: Abdelkader Hameurlain ,Josef Kung ,Roland Wagner ,Hendrik Decker ,Lenka Lhotska ,Sebastian Link

1st Edition

366249213X, 978-3662492130

More Books

Students also viewed these Databases questions

Question

LOQ 13-18: How does romantic love typically change as time passes?

Answered: 1 week ago