Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

3. Create a rock, paper, scissors game using a Python function. (Just a reminder: Rock smashes scissors; scissors cut paper; paper covers rock.) The Python

image text in transcribed
3. Create a rock, paper, scissors game using a Python function. (Just a reminder: Rock smashes scissors; scissors cut paper; paper covers rock.) The Python function is to be called "RPSGame .py" with no inputs and three outputs. The outputs are in order the number of wins, draws and losses. The function will randomly select from a list of the "weapons". There are several ways to do this. One way is to use the random number generator (from the number guess game) and link it by index to a list of weapons. The computer's "pick" should obviously not be printed. A user will then be prompted to enter their weapon choice or"q" to quit. a. b. c. Print the statement "rock, paper, scissors, GO!" or some other clever way to let the user d. Use if and print statements to declare the winner based on the choices by the computer e. The game should automatically continue until someone (either the computer or the user) know the game has begun and user. If both the computer and the user pick the same weapon, a tie should be called wins three times. Thus, counters are necessary

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

Databases And Information Systems 1 International Baltic Conference Dbandis 2020 Tallinn Estonia June 19 2020 Proceedings

Authors: Tarmo Robal ,Hele-Mai Haav ,Jaan Penjam ,Raimundas Matulevicius

1st Edition

303057671X, 978-3030576714

More Books

Students also viewed these Databases questions