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

Suppose that we use a 2-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 that enrolls at least 10 students. The expected output should look like the following:

[['ISOM2020', '79.38'], ['ISOM3400', '79.30']]

Tips:

Use the star operator to gather up excess items;

Use the if part of a comprehension to specify the filtering rule

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!