Question: PYTHON Program INSTRUCTIONS Write a program that let's the user play the game of rock, paper, scissors against the computer. The program should work as

PYTHON Program

INSTRUCTIONS Write a program that let's 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 for Numonday(computer player). You may choose your own AI name.

2. The user enters his or her input from the menu for rock, paper, or scissors by typing via the keyboard.

3. A winner is selected and 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.)

- If one player chooses paper and the other player chooses rock, then paper wins. (Paper wraps rock)

- If both players make the same choice, the game must be played again to determine the winner.

There should be a loop that plays the game until the user enters q or Q to quit the game

Functions (You must have 2 minimum)

Custom Built Functions to be in included in your program

function name arguments passed

parameter

return value
menu_choice yes user_choice
determine winner comp_choice human_choice

yes comp_score user_score

You can store the user and computer choice in strings and compare them

OR EXTRA CREDIT

You can store the players' choices in a list r,p,s and the winning combinations in a 2nd list pr sp rs. Concatenate the user and computer choice and compare to the 2nd table to determine winner

Example Output

Hi Human, I am Numonday, what is your name? Monty Numonday wish for Monty to play game with Numonday, Choose from Menu below to play Rock, Paper, Scissors (you decide if the will choose a numeric or a letter from the menu) Game Menu Enter Menu Choice 1. Rock -r 2. Paper -p 3. Scissors -s 4. Quit - q

Make a Move Monty: 3 or s (depends on how you build) Numonday choose scissors Monty choose scissors

Coincidentally, we chose the same thing. Great Minds Think Alike. Do Over !!

Game Menu Enter Menu Choice 1. Rock -r 2. Paper -p 3. Scissors -s 4. Quit - q

Make a Move Monty: 1 or r (depends on how you build)

Numonday choose paper Monty choose rock Numonday wins game!

Game Menu Enter Menu Choice 1. Rock -r 2. Paper -p 3. Scissors -s 4. Quit - q

Make a Move Monty: 2 or p (depends on how you build)

Numonday choose scissors Monty choose paper Numonday wins game!

Enter Menu Choice 1. Rock -r 2. Paper -p 3. Scissors -s 4. Quit - q

Make a move Monty: Q

Goodbye Monty It was fun playing with your mind

Name Wins Status ---------------------------------------- Monty 2 Rookie Numonday 5 The Boss

Print the example table above

Key below (this does not appear in program output)

Score Status 0-4 Rookie 5-9 The Boss 10 or Above Brilliant

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!