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

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 04:00
Which of the following kinds of programs displays an online advertisement in a banner or pop-up window on webpages, email, or other internet service? e
Answers: 2
question
Computers and Technology, 23.06.2019 00:30
Which one of the following is the most accurate definition of technology? a electronic tools that improve functionality b electronic tools that provide entertainment or practical value c any type of tool that serves a practical function d any type of tool that enhances communication
Answers: 1
question
Computers and Technology, 23.06.2019 11:50
While preforming before operation pmcs, you notice the front right tire appears slightly under-inflated. what is the proper action?
Answers: 3
question
Computers and Technology, 24.06.2019 13:00
George heard about the benefits of a data warehouse. he wants to try implementing one for his organization. however, he is afraid that transferring data to the data warehouse will affect transaction time. which element ensures that transactions are not affected when moving data to a warehouse? when data is transferred to a data warehouse, the a area frees the source system to continue transaction processing.
Answers: 2
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
Questions on the website: 13722367