Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

For this assignment you will be editing an existing script that contains a simple version of Paper, Rock, Scissors? written in Python 3. The py file you will be editing then resubmitting ishere . You...

1 answer below »

For this assignment you will be editing an existing script that contains a simple version of Paper, Rock, Scissors? written in Python 3. The py file you will be editing then resubmitting isherePreview the document. You will need to make three coding changes to the game:

* Change the name of the objects and how they interact (ie: squirt gun beats torch)

* Ask the user their name and refer to them after each turn.

* Implement some sort of 'coin' or 'lives' system where the user can run out of attempts and also can win more attempts.

* {OPTIONAL} Make a way for the game to be won an/or lost.

The script you will be editing imports therandommodule. You can read more about this modulehere(Links to an external site.).

Rules for Python assignment submissions:

Submit your code as a .py file.

Your first line of code MUST be a comment with your name and the date.

You may ONLY use the functions listed in this or past assignments.

Information for any function we use can be foundhere(Links to an external site.)Links to an external site..

This assignment includes material through Python Lesson 10 locatedhere.Links to an external site.

Answered 6 days After Feb 21, 2021

Solution

Aditya answered on Feb 28 2021
154 Votes
from random import randint
winScore = 6;
lives = 3
#create a list of play options
t = ["Rock", "Paper", "Scissors"]
#assign a random play to the compute
computer =t [randint(0,2)]
#set player to False
player = False
playerName = input("Enter player name: ")
while lives != 0:
if lives == winScore:

eak
print("Player Name: "+playerName)
print("Player lives left: "+str(lives))
player = input("Rock, Paper, Scissors?")
...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here