subject

You are writing a program to analyze the games played by a sports team. You are going to compare the wins and losses at home to the wins and losses at away games. The members of season are lists that contain where the game was played (home or away), your team's score and the opponent's score. The following is a very small sample of what season contains. season = [ ['home',10, 2], ['away',3, 5], ['home', 5, 2], ['home', 3, 7] ]
What is the missing line of code of the following portion of the program?
season = [ ['home',10, 2], ['away',3, 5], ['home', 5, 2], ['home', 3, 7] ]
homeWins = 0
homeLosses = 0
awayWins = 0
awayLosses = 0
for item in season:

if item[1] > item[2]:
homeWins = homeWins + 1
else:
homeLosses = homeLosses + 1

ansver
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 02:30, lauriepdx
The cm is responsible for overseeing the actions of the crisis management team and coordinating all crisis management efforts in cooperation with disaster recovery and/or business continuity planning, on an as-needed basis
Answers: 1
image
Computers and Technology, 22.06.2019 08:10, josued123321
Alook-up table used to convert pixel values to output values on a monitor. essentially, all pixels with a value of 190 or above are shown as white (i. e. 255), and all values with a value of 63 or less are shown as black (i. e. 0). in between the pixels are scaled so that a pixel with a value p is converted to a pixel of value 2/127 −+3969). if a pixel has a value of 170 originally, what value will be used to display the pixel on the monitor? if a value of 110 is used to display the pixel on the monitor, what was the original value of the pixel?
Answers: 1
image
Computers and Technology, 22.06.2019 15:00, gmc2771
Hyperactive media sales has 10 windows 7 laptop computers used by sales-people in the organization. each laptop computer has several customized applications that are used during the sales process as well as customer relationship management software. all of the applications on the laptops are difficult to configure and have large data files. if all of the laptops have current hardware, what is the easiest way to install windows 10 on them?
Answers: 1
image
Computers and Technology, 22.06.2019 18:30, ovoxotas
Which of the following commands is more recommended while creating a bot?
Answers: 1
You know the right answer?
You are writing a program to analyze the games played by a sports team. You are going to compare the...

Questions in other subjects:

Konu
Social Studies, 24.11.2020 22:10
Konu
Mathematics, 24.11.2020 22:10