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 »
DUMMY


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 1 days AfterJun 19, 2021

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

Payal answered on Jun 20 2021
143 Votes
# python program that simulates the game rock, paper, and scissors
import random
play = 'yes'
win
= 0
lose = 0
tie = 0
Lwin = 0
Llose = 0
while (play == 'yes'):

user_throw = input("Enter a choice (rock, paper, scissors): ")
game_actions = ["rock", "paper", "scissors"]
computer_throw = random.choice(game_actions)
print(f"\nYou chose {user_throw}, computer chose {computer_throw}.\n")
if user_throw == computer_throw:
print(f"Both players selected {user_throw}. It's a tie!")
tie = tie + 1
elif...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here