Design a python program that simulates the game rock, paper, and scissors. You are to keep track of your wins, losses, and ties. You are to allow the users to play over and over again until he or she...

1 answer below »
pfa


Design a python program that simulates the game rock, paper, and scissors.  You are to keep track of your wins, losses, and ties.  You are to allow the users to play over and over again until he or she decides to quit.  After each throw, you will display the results of the throw followed by the current win, loss, tie numbers.  A throw consists of the player picking either Rock, Paper, or Scissors followed by the computer randomly choosing Rock, Paper, or Scissors. Rules of the game: Rock beats Scissors. Paper beats Rock. Scissor beats paper. MENU: 1. Throw Rock 2. Throw Paper 3. Throw Scissors 4. Quit Sample Run: Option 1: == RESULTS == Computer Throws Scissors, you win Wins…………………...:1 Losses………………...: 0 Ties…………………..: 0 Longest Win Streak....: 1 Longest Lose Streak..: 0 Note: After each Throw you will display the results from above
Answered Same DayMay 17, 2021

Answer To: Design a python program that simulates the game rock, paper, and scissors. You are to keep track of...

Aaditya D answered on May 18 2021
140 Votes
import random
input("Welcome to Rock, Paper, Scissors! Press Enter your name to start.")
print()
user_wins = 0
computer_wins = 0
choices = ["rock", "paper", "scissors"]
while True:
random_index = random.randint(0,2)
cpu_choice = choices[random_index]
user_choice = input("Rock, Paper, or Scissors? ").lower()
while user_choice not in choices:
user_choice = input("That is not a valid choice. Please try again: ").lower()

print()
print("Your choice:", user_choice)
print("Computer's choice:",...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here