Question: Rock - Paper - Scissors - Lizard - Spock NOTE: You should have all the required skills to plan & implement this task, even though
RockPaperScissorsLizardSpock
NOTE: You should have all the required skills to plan & implement this task, even though the instructions are "a bit vague"
The task of this exercise is to program an infamous game of RockPaperScissorsLizardSpock For this
The Difference between this and regular rockpaperscissors is a small added complexity, now each option can beat two different choices and can also lose to two different choices. Here is a diagram defining the relationships:
Create a game loop thats just a regular while loop! that asks for user input. User should select one of the options from RockPaperScissorsLizardSpock or type "exit" to stop the program. The game must play repeatedly until the player wants to exit.
Initialize the options as a list of strings Rock "Paper",... Use Python's randommodule to select the computer's answer from the list.
HINT: This is probably easiest to implement with multiple IFELSE structures.
Example run:
Welcome to RockPaperScissorsLizardSpock!
Choose Rock, Paper, Scissors, Lizard, or Spock type 'exit' to quit: rock
The computer chose: Lizard
You won! Rock beats Lizard.
Do you want to play again? yesno: yes
Choose Rock, Paper, Scissors, Lizard, or Spock type 'exit' to quit: spock
The computer chose: Lizard
You lost! Lizard beats Spock.
Do you want to play again? yesno: no
Thanks for playing! Goodbye!
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
