Computers and Technology

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

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 01:00, tyneshiajones124
Duplicating objects creates copies that a. move differently than the original object b. erase the original object c. look and act like the original object d. add events to a game
Answers: 1
image
Computers and Technology, 23.06.2019 06:30, QueeeenUknown7437
How do you write an argumentative essay about the importance of free enterprise ?
Answers: 1
image
Computers and Technology, 23.06.2019 09:30, shadowsnake
Write a function called checkfactor that takes two arrays of positive numbers, firstnumberrow and secondnumberrow. checkfactor checks if the first entry in firstnumberrow is divisible by the first entry in secondnumberrow, and performs the same operation on the next array elements until all entries have been checked. all the numbers are positive and the number of entries in the arrays are the same. the function should return the identified divisible numbers in two row arrays named firstdivisible and seconddivisible. restrictions: branches or loops should not be used. the code must use the internal mod and logical functions. hint: the mod function should be used to determine if two numbers are divisible. ex: for num1 and num2 if mod(num1,num2) is 0, then the two numbers are divisible. this is matlab
Answers: 2
image
Computers and Technology, 23.06.2019 14:30, ahmedeldyame
Select the correct answer. which step can possibly increase the severity of an incident? a. separating sensitive data from non-sensitive data b. immediately spreading the news about the incident response plan c. installing new hard disks d. increasing access controls
Answers: 2
Do you know the correct 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: