Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started