Answered step by step
Verified Expert Solution
Question
1 Approved Answer
PYTHON HELP! Question 1 (8 points) Purpose: To practice chained if-elif-else constructs. Degree of Difficulty: Easy. The code is not difficult, but there's a lot
PYTHON HELP!
Question 1 (8 points) Purpose: To practice chained if-elif-else constructs. Degree of Difficulty: Easy. The code is not difficult, but there's a lot to read about it The game 'rock-paper-scissors-lizard-spock' is an extension of the commonly known game 'rock-paper scissors. If you're not familiar with rock-paper-scissors, click here. Rock-paper-scissors-lizard-spock adds two additional moves to the basic game. The rules are summarized both in this educational video (click to view), and the image below. The arrows indicate which move beats which. For example, the arrow from paper to Spock indicates that paper disproves Spock (if one player plays paper, and the other plays Spock the one that played paper wins) OCK, PAPER,SCISSORS, LIZARD,SPOCK There are 25 possible pairs of moves, so sometimes it's hard to remember them. You will write a computer program that will act as a referee. The program will ask for the moves made by the two players via console input and report which player won. To solve this problem, you'll write a function that accepts the two moves made by the players as arguments, and returns the outcome (for more detail, see below). Separately. you'll write a main program to perform the console input to request player 1's move, and player 2's move, and then call the function to determine the outcome Note: The computer is not one of the players, the computer only determines who won given the moves that the two human players made. Sample Run Sample input and output (input typed by the user is shown in green text for two different runs, the first showing a winner, the second showing a tie. Enter move for player 1: spock Enter move for player 2: roch Player 1 wins ! Enter move for player 1: lizard Enter move for player 2: 1izard It was a tie
Step 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