Answered step by step
Verified Expert Solution
Question
1 Approved Answer
According to the computer grader, the outcome for lizard is wrong. Can someone help? it's in python The Big Bang Theory fans may recognize Rock
According to the computer grader, the outcome for "lizard" is wrong. Can someone help? it's in python
The Big Bang Theory fans may recognize Rock Paper Scissors Lizard Spock as a game of chance that expands on the standard Rock Paper Scissors game. It introduces two new hand signs and several more rules. The rules: Scissors cuts Paper Paper covers Rock Rock crushes Lizard Lizard poisons Spock .Spock smashes Scissors Scissors decapitates Lizard Lizard eats Paper . Paper disproves Spock Spock vaporizes Rock Rock crushes Scissors 1 # Rock Paper Scissors Lizard Spock 2 3 from random import choice,seed 4 5 def computer_player(): '"return a random selection from the 5 options.'"" 7 return choice('rock', 'paper, scissors', 'lizard', spock']) 8 10 def human_player): prompt and return a human selection from the 5 options.'"" human-input("rock, paper, scissors, lizard, or spock? ") return humarn pass 12 13 14 15 16 17 def outcome(playerl, player2): 18 "return win, lose, or draw for the player1.'"' if player1player2: return "draw" return "win" return "win" return "win" return "lose" return "lose'" return "lose return "win" return "lose" return "win" return "lose" return "ohno" 20 21 elif (player1 "rock") and (player2 "scissors "or player2"lizard"): elif (player1"scissors") and (player2"paper"or player2-"lizard"): elif (player1"paper") and (player2rock"or player2"spock"): elif (player1 "rock") and (player2"paper") or (player2-"spock"): elif (player1"scissors") and (player2-"rock"or player2-"spock"): elif (player1-"paper") and (player2"scissors"or player2"lizard") elif (player1-"spock") and (player2"scissors"or player2"rock"): elif (player1-"spock" and (player2-"paper"or player2"lizard"): elif (player1-"lizard")and (player2"spock" or player2-"paper") elif (player1-lizard")and (player2"rock" or player2-"scissors"): else: 23 25 26 27 28 29 30 31 32 34 35 36 37 38 39 40 41 42 43 pass 45 46 def main() 47 48 49 50 51 52 53 54 # Do not modify the following code or your tests will fail. 55 if namemain' 56 57 # determine player choices human human_player() computercomputer_player() # print human outcome computer print(human, outcome (human, computer), computer) seed (42) main()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