Question: Create a rock, paper, scissors game using a Python function. ( Just a reminder: Rock smashes scissors; scissors cut paper; paper covers rock. ) The
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" with no inputs and three outputs. The outputs in order are the number of wins,
draws, and losses.
a 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 not be
printed.
b A user will then be prompted to enter their r for rock, p for paper, s for scissors, or
q for quit. If anything else is entered the function should keep asking until one of those
four letters is entered.
c Print the statement "Rock, Paper, Scissors, GO or another clever way to let the user
know the game has begun.
d Use if and print statements to declare the winner based on the computer and user's
choices. A tie should be called if both the computer and the user pick the same weapon.
e The game should automatically continue until someone either the computer or the user
wins three times. Thus, counters are necessary.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
