Question: In python, no using lists or global variables Rock-Paper-Scissors Write a program that allows a user to play Rock-Paper-Scissors against the computer. Have the program

In python, no using lists or global variables

In python, no using lists or global variables Rock-Paper-Scissors Write a program

Rock-Paper-Scissors Write a program that allows a user to play Rock-Paper-Scissors against the computer. Have the program keep score of how many times each has won a round. Your program should have a main method that has a loop that repeats the game until the user chooses to quit. Display the final score before exiting. Write the following functions: 1. weapon_menu ( ) - Asks the user to input their choice: (R)ock, (P)aper, (S)cissors or (B)ack. Checks user input for validity and then returns the inputted value. 2. comp_weapon () - Randomly chooses the computer's throw and returns an "R", "P", or "S". 3. find_winner (player, comp) - Passes in the two weapons (R,P, or S), displays the throws, compares the two weapons and displays the result and returns who is the winner of that round ( 0=Tie,1= Player, 2= Computer). a. Rock crushes Scissors b. Scissors cuts Paper c. Paper covers Rock 4. display_scores (player, comp) - Displays the scores. Example Output (user input is in italics): RPS Menu: Computer wins 1. Play game Choose your weapon: 2. Show Score R. Rock 3. Quit P. Paper 1 S. Scissors Choose your weapon: B. Back R. Rock B P. Paper RPS Menu: S. Scissors 1. Play game B. Back 2. Show Score P 3. Quit You chose Paper 2 Computer chose Paper Player =0 Tie Computer =1 Choose your weapon: RPS Menu: R. Rock 1. Play game P. Paper 2. Show Score S. Scissors 3. Quit B. Back 3 5 Final Score: You chose Scissors Player =0 Computer chose Rock Computer =1

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!