IT 280 - Lab \#2: Guessing Game (Rock, Paper, Scissors, Lizard, Spock) Instructions To Submit This Program In IDLE, choose File -> NewFile. Type your program in the window that pops up, saving it as you work. The file name should be your Last Name, followed by Lab 2.2.py in a Python program. Test the program by running it (F5 or Run→Run Module). Program Inputs: Ask the user for their choice (Rock, Paper, Scissors, Lizard, Spock) - (This can be done through a menu choice or in any other way). The program will randomly choose one of the five possibilities. (Generate random numbers in Python). The program will generate the winner and an appropriate statement based on the following:✓Rock crushes Lizard✓Rock destroys Scissors✓Paper disproves Spock✓Paper covers Rock✓Scissors cuts Paper✓Scissors decapitate Lizard✓Lizard eats Paper✓Lizard Poisons Spock✓Spock smashes Scissors✓Spock vaporizes Rock The user will then be asked if they want to play again, and the process repeats until they choose to stop playing. Please correct and complete this phyton code so that it performs the task outlined above. import random def get_choice(): \# This function gets the user's choice of move. choice = inputi,"Enter your choice (Rock, Paper, Scissors, Lizard, Spock):") choice=choice.lower') if choice in ["rock", "paper", "scissors", "lizard", "spock"]: return choice else: print("Invalid choice. Try again. ") return get_choice() def get_computer_choice(): \# This function gets the computer's choice of move. choices = ["rock", "paper", "scissors", "lizard", "spock"] return random.choice(choices) def get_winner(player_choice, computer_choice): \# This function determines the winner of the game. if player_choice==
IT 280 - Lab \#2: Guessing Game (Rock, Paper, Scissors, Lizard, Spock) Instructions To Submit This
Trending now
This is a popular solution!
Step by step
Solved in 2 steps