Skip to Content
Learn
Student Becomes the Teacher
Part of the Whole

Good! Now let’s calculate the class average.

You need to get the average for each student and then calculate the average of those averages.

Instructions

1.

Define a function called get_class_average that has one argument class_list. You can expect class_list to be a list containing your three students.

First, make an empty list called results.

For each student item in the class_list, calculate get_average(student) and then call results.append() with that result.

Finally, return the result of calling average() with results.

Folder Icon

Take this course for free

Already have an account?