Answered step by step
Verified Expert Solution
Question
1 Approved Answer
HELP PYTHON 3 (NOT JAVA ) Write a function called rock_paper_scissors_lizard_spock that has two parameters. These arguments for these parameters must be one of the
HELP PYTHON 3 (NOT JAVA)
Write a function called rock_paper_scissors_lizard_spock that has two parameters. These arguments for these parameters must be one of the following five strings: 'rock', 'paper 'scissors', 'lizard', 'spock'. The first parameter is the move made by player 1, the second is the move made by player 2. The function must determine which player won, and return the integer 1 if player 1 was victorious, and return the integer 2 if player 2 was victorious. If the game was a tie (both players made the same move) then return the integer 0. You'll need to use conditionals (if, if else, else) to determine which player wins. Write an appropriate docstring for your function in part (a) In the main program (after the function definition) write code to prompt for, and read the players moves from the console. You may assume that the user always enters one of the five strings listed in part (a) that indicate legal moves. Pass the players' moves to the rock_paper_scissors_lizard_spock function and obtain its return value. Use the return value to print a message to the console indicating which player won, or whether it was a tie. You'll need to use conditionals to determine what message to print outStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started