Page 1 of 1

IN PYTHON. Write code that can be placed below the comment (# Write your code here) to complete the program. Use loops t

Posted: Sat May 14, 2022 8:18 pm
by answerhappygod
IN PYTHON. Write code that can be placed below the
comment (# Write your code here) to complete the program. Use loops to calculate
the sums and averages of each column of scores stored in the 2-dimensional list:
students so that when the program executes, the following output is displayed. Do
not change any other part of the code.
OUTPUT:
Average scores for tests:
Test # 1:16.0
Test # 2: 17.0
Test # 3 : 18.0
CODE:
students = [
[11, 12, 13],
[21, 22, 23]
]
avgs = []
# Write your code here:
print('Average scores for tests: ")
for i, avg in enumerate (avgs):
print('Test #', i + 1, ':', avg)