The premise of the game is a play on the concept of Rock, Paper, Scissors (or Rochambeau - depending on where you're from). Your script will select a pirate from a list for the player and another to...

1 answer below »

The premise of the game is a play on the concept of Rock, Paper, Scissors (or Rochambeau - depending on where you're from). Your script will select a pirate from a list for the player and another to serve as an opponent.


Next, one of the 3 available 'attacks' will be chosen for each character and compared to determine a winner. Since we're dealing with Pirates, we will use Dodge, Parry, Thrust instead of the traditional Paper, Rock, Scissors


So instead of: Paper beats Rock > Rock beats Scissors > Scissors beat Paper


We'll use: Dodge beats Parry > Parry beats Thrust > Thrust beats Dodge


You will have to construct a conditional statement that will compare one attack against the other and decide who wins the attack. Continuing, we are looking to make sure that the script will now allow the 'game' to continue until one character has won at least 3 rounds.


The script below has a few hints to get you started.



Objectives


For Milestone 2, you will need to complete the following tasks:


























Objectives
Add the conditional to determine the winner.
A Loop should be added to ensure that the game continues until either the player or opponent scores at least 3 points.
Add a scoring system to record 1 point for each 'win' scored by either the player or the opponent.
Print the winner's name.
Activities 1 -3 must run correctly to receive full credit.



# 1. Tony Jones-Organ # 1. Python 3.8.2 # 1. Milestone 1 # 1. ADD YOUR MULTI LINE COMMENT ON THE NEXT LINE. ###### Import the random Module ##### import random ###### Here are your list of Pirates ##### pirates = [ 'Captain William Kidd', 'Pierre Le Grand', 'Red Leg Grieves', 'Edward Low', 'Calico Jack Rackham', 'Anne Bonny', 'Captain Henry Morgan', 'Black Sam Bellamy', 'Black Bart Roberts', 'Edward Blackbeard Teach' ] # 2. PRINT THE CONTENT OF THE PIRATES LIST TO THE SCREEN HERE # A: PLACE YOUR ANSWER ON THE NEXT LINE print(pirates) ##### Attacks List ##### attack = ['dodge', 'parry', 'thrust'] # 3. PRINT THE CONTENTS OF THE ATTACK LIST TO THE SCREEN HERE # A: PLACE YOUR ANSWER ON THE NEXT LINE print(attack) ##### Choosing the Characters for the fight ##### player = random.choice(pirates) opponent = random.choice(pirates) print(player) print(opponent) # 4. PRINT THE VALUES STORED IN THE PLAYER AND OPPONENT TO THE SCREEN - Change the lines below to correctly concatenate PLAYER and OPPONENT with # the variables above so that when the statement prints to screen, the chosen # character names are shown. print ("Ahoy ye swabs! Prepare for battle!") print ("PLAYER has challenged OPPONENT in one on one combat!") ##### Choosing the attack ##### pattack = random.choice(attack) oattack = random.choice(attack) # 5. PRINT THE VALUES STORED IN PATTACK AND OTTACK TO THE SCREEN. # A: PLACE YOUR ANSWER ON THE NEXT LINE print(pattack) print(oattack) # 6. CREATE A CORRECTLY CONCATENATED STRING THAT CONTAINS PLAYER, OPPONENT, PATTACK & OATTACK # EXAMPLE: ANNE BONNY ATTACKS WITH DODGE, WHILE EDWARD LOW ATTACKS WITH PARRY # A: PLACE YOUR ANSWER ON THE NEXT LINE print(player + opponent + pattack + oattack)
Answered Same DayOct 07, 2021

Answer To: The premise of the game is a play on the concept of Rock, Paper, Scissors (or Rochambeau - depending...

Aditya answered on Oct 08 2021
133 Votes
# 1. Tony Jones-Organ
# 1. Python 3.8.2
# 1. Milestone 1
# 1. ADD YOUR MULTI LINE COMMENT ON THE
NEXT LINE.
###### Import the random Module #####
import random
###### Here are your list of Pirates #####
pirates = [
'Captain William Kidd',
'Pierre Le Grand',
'Red Leg Grieves',
'Edward Low',
'Calico Jack Rackham',
'Anne Bonny',
'Captain Henry Morgan',
'Black Sam Bellamy',
'Black Bart Roberts',
'Edward Blackbeard Teach'
]
# 2. PRINT THE CONTENT OF THE PIRATES LIST TO THE SCREEN HERE
# A: PLACE YOUR ANSWER ON THE NEXT LINE
print('List of Pirates Avaliable: ')
for pirate in pirates:
print(pirate)
##### Attacks List #####
attack = ['dodge', 'parry', 'thrust']
# 3. PRINT THE CONTENTS OF THE ATTACK LIST TO THE SCREEN HERE
# A: PLACE YOUR ANSWER ON THE NEXT LINE
print("\nList of Attacks Avaliable: ")
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