Try it on paper first. A hint, the key idea and the worked solution are here when you need them.
Here is a table of marks: one row for each student, and one column for each test.
Find (1) the item in row 2, column 1, (2) the total of the third column, and (3) the average of each row.
Have you tried it?
Work it out on paper first. It is fine to get stuck or make a mistake: that is how we learn. When you are ready, compare your working with the solution.
Plan. table[row][column] picks one item. The first position is the row, and the second is the column. Both start at 0.
table[2][1] is row 2 ([66, 71, 80]), column 1: 71.table[row][2] for each row. The total is 64 + 77 + 80 = 221.sum(row) / len(row).The averages are 73.67 (221 divided by 3), 75.0 and 72.33, rounded to two places.
Answer: 71; 221; about 73.67, 75.0 and 72.33.
Log in to join the discussion.
Loading…