Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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