Here, I have updated the outcome function with a couple of missing cases out of the 10 rules. Rules are mentioned as comments along the code for readability.
Code:
def outcome(player1, player2):
if player1 == choices[2] and player2 == choices[1]: #
Scissor cuts Paper
return 'win'
elif player1 == choices[1] and player2 == choices[0]:
# Paper covers Rock
return 'win'
elif player1 == choices[0] and player2 == choices[3]:
# Rock crushes Lizard
return 'win'
elif player1 == choices[3] and player2 == choices[4]:
# Lizard poisons Spock
return 'win'
elif player1 == choices[4] and player2 == choices[2]:
# Spock smashes Scissors
return 'win'
elif player1 == choices[2] and player2 == choices[3]:
# Scissors decapitates Lizard
return 'win'
elif player1 == choices[3] and player2 == choices[1]:
# Lizard eats Paper
return 'win'
elif player1 == choices[1] and player2 == choices[4]:
# Paper disproves Spock
return 'win'
elif player1 == choices[4] and player2 == choices[0]:
# Spock vaporises Rock
return 'win'
elif player1 == choices[0] and player2 == choices[2]:
# Rock crushes Scissors
return 'win'
elif player1 == player2:
return 'draw'
else:
return 'lose'
human_player function mentioned above is mostly right with just a correction of indentation. I have shared the update code below:
def human_player():
while True:
choose = input("rock, paper,
scissors, lizard or spock? ")
if choose.lower() in choices:
return
choose.lower()
else:
print('Incorrect
Selection')
I have also added a call to the main() function after seed(42) so as to play the game.
Screenshot of the entire code:
![from random import choice, seed choices = [rock, paper, scissors, lizard, spock] def outcome (playeri, player2): if](http://img.homeworklib.com/questions/70b3da70-cad7-11eb-a932-bf2b4d0b7be3.png?x-oss-process=image/resize,w_560)

Test screenshot



5.12 A5 Program Do you want to play. a. game? The Big Bang Theory fans may...
java pls
Rock Paper Scissors Lizard Spock Rock Paper Scissors Lizard Spock is a variation of the common game Rock Paper Scissors that is often used to pass time (or sometimes to make decisions.) The rules of the game are outlined below: • • 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 Write a program that simulates the...
Write a program in python that lets the user play the game Rock, Paper, Scissors against the computer. The program should work as follows: When the program begins, a random number in the range of 1 through 3 is generated. If the number is 1, then the computer has chosen rock. 2 corresponds to paper, and 3 corresponds to scissors. To set up the random number library, write the following at the top of your code: import random random.seed(300) Use...
C++ Write a program that plays the rock, paper, scissors game. Rock beats scissors; scissors beats paper; paper beats rock. You must use these specific functions in your program. These are the prototypes: char generateP2toss(); int checkThrow(char, char); void printStatistics(int, int, int, int); void finalStatistics(int, int, int, int); void welcome(); Notes on these functions: generateP2toss() will generate the computer's toss (the computer is player2). It returns either an "r", "p", or "s/" checkThrow(char char) will check the throw by passing...
“Oh I know, let’s play Rock, Paper, Scissors, Lizard, Spock. It’s very simple.” What better way to expand the classic Rock, Paper, Scissors game than to add Lizard and Spock! Sheldon and Raj brought Sam Kass’s game to life on The Big Bang Theory in “The Lizard-Spock Expansion” episode. Assignment & Discussion Your task in Programming Assignment 8 is to create a C# console app-version of Rock, Paper, Scissors, Lizard, Spock (RPSLS). Use any of the programming tools and techniques...
IN JAVA. Write a program that lets the user play the game of Rock, Paper, Scissors against the computer. The program should work as follows. When the program begins, a random number in the range of 1 through 3 is generated. If the number is 1, then the computer has chosen rock. If the number is 2, then the computer has chosen paper. If the number is 3, then the computer has chosen scissors. Don’t display the computer’s choice yet....
Create a python program to play rock paper scissors using a while loop and if statements. I have started but have gotten stuck in a continuous loop. Please look over my code and help me find where I went wrong. Here it is: import random #Choice weapons=['Rock' ,'Paper' ,'Scissors'] print('Rock, Paper, Scissors!') print('Rock, Paper, Scissors!') print('Shoot!') human=input('Choose Rock, Paper, Scissors, or Quit! ') print('')#Blank Line while human != 'Quit': human_choice=human computer=random.choice(weapons) print(computer) if human==computer: print("It's a tie!") elif human=='Rock': if...
Write a Python program (rock_paper_scissors.py) that allows two players play the game rock paper scissors. Remember the rules: 1. Rock beats scissors 2. Scissors beats paper 3. Paper beats rock The program should ask the users for their names, then ask them for their picks (rock, paper or scissors). After that, the program should print the winner's name. Note, the players may pick the same thing, in this case the program should say it's tie. when the user input an...
Python Language: Please see program listed below of a game called: Rock, Paper, Scissors. Please add an exception, for example if the user inputs something else other than rock, paper or scissors, the exception will print message: "Enter only rock, paper, or scissors". Also add option to keep playing the game, for example: print: "Would you like to play again? Enter Y or N". If the user says Y, the game will repeat, if N, the game will end and...
(Java) Write a program that lets the user play the game of Rock, Paper, Scissors against the computer. The program should work as follows. When the program begins, a random number in the range of 1 through 3 is generated. If the number is 1, then the computer has chosen rock. If the number is 2, then the computer has chosen paper. If the number is 3, then the computer has chosen scissors. Don’t display the computer’s choice yet. The...
Python please. I have a working one that doesn't keep track of w/l ratio, it may be helpful to see how others did the entire program and inserted that module. Write a modular program that let the user play the game of Rock, Paper, Scissors against the computer. The program should work as follows: When the program begins, a random number in the range of 1 thru 3 is generated but do not display the computer choice immediately. Number 1...