Question: 9) Suppose that we use a 3-level nested list to maintain gradebooks for several IS courses: IS_gradebooks = [['ISOM2020', [59, 100, 80, 55, 95, 87,

9) Suppose that we use a 3-level nested list to maintain gradebooks for several IS courses:

IS_gradebooks = [['ISOM2020', [59, 100, 80, 55, 95, 87, 95, 98, 74, 69, 92, 94, 75, 97, 43, 57]], ['ISOM3400', [98, 73, 45, 88, 72, 94, 82, 100, 89, 52]], ['ISOM3600', [24, 44, 100, 81, 91, 93, 87, 72, 55]], ['ISOM4200', [90, 56, 78, 67, 90, 93]] ]

Write a comprehension to calculate the average score for each course. The expected output should look like the following:

[['ISOM2020', '79.38'], ['ISOM3400', '79.30'], ['ISOM3600', '71.89'], ['ISOM4200', '79.00']]

Tips:

The output expression should be a list display;

Use a f-string to round each average score to 2 decimal places.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!