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 5 days AfterJul 10, 2021

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

Love answered on Jul 15 2021
143 Votes
Introduction to assignment:
A Python program which is basically a simulation of the game rock, paper and scissor. In this as
signment the program needs to keep track of number of wins,losses and ties. We need to allow user to play game over and over again until he or she decides to quit. After each throw we are displaying result of throw followed by current numbers of wins, losses and ties. A throw consist of player picking either Rock, Paper or Scissors followed by computer randomly choosing Rock, Paper or Scissors.
Requirements specifications of assignment:
Python programming language, sys module needed to be imported for termination of program, random module for randomly choosing rock, paper or scissors by computer
Source Code:
#importing random and sys
import random,sys
# Tracking wins, loss, tie
win = 0
loss = 0
tie = 0
# PRINTING RULES OF THE GAME
print("RULES OF THE GAME: \n Rock beats Scissors \n Paper beats Rock \n Scissor beats Paper")
while True:
# Getting Inputs from User
UserThrows = int(input("Menu \n 1.Throw Rock \n 2.Throw Paper \n 3.Throw Scissors \n 4.Quit\n"))
#Checking if user selects 4 then quit the game
if UserThrows == 4:
sys.exit()
# Selecting Random numbers for...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here