Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using Python: You will build a Rock-Paper-Scissors type of game, but with your own three items. The user will play against your computer program player

Using Python:

You will build a Rock-Paper-Scissors type of game, but with your own three items. The user will play against your computer program player and you will keep track of the scores.

Some suggestions for items:

Elemental - fire, water, wind

Marvel characters battle - Iron Man, Captain America, Thor

Cooking themed - microwave, toaster, fire pit

Animal themed - cats, dogs, hamsters

be creative and have fun!

The program must do the following:

Print out a title for the game.

Ask the user their name.

Greet the user.

Ask if they would like to play a game.

If yes, continue to the game.

If no, print a farewell message and exit the game.

Playing the game

Print out instructions on how to play the game. Describe the items and whether the items will win or lose compared to the other items. Format the instructions nicely for the best user experience.

Generate a random Computer Player name using two lists - one will be the first part of the name, and the other will be the second part of the name. Have at least 5 items in each list to generate a username made from both lists.

Ask the user which choice they would like to select.

Randomly pick a choice for the Computer Player.

Hint: You might want to generate a random number from 1 to 3, and then do an if statement that will align the random number to a particular option. Or you can use a list and pick the index of the choice. 1 might be rock, 2 might be paper, and 3 might be scissors.

Compare the choices for a win, loss or tie.

Record each players stats.

Output the stats at the end of each game.

Ask the player if they would like to play again. If so, start the process again, keeping the stats updated with the correct values.

Technical Requirements

Import and use the random module.

Use at least TWO functions.

One function must pass a parameter.

One function must return a value.

Use if/elif/else to help control program flow.

Be aware of the user experience.

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

Students also viewed these Databases questions