Log in from a computer to take this course

You'll need to log in from a computer to start Learn Python 2. But you can practice or keep up your coding streak with the Codecademy Go app. Download the app to get started.

apple storegoogle store

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.



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.

Take this course for free

Mini Info Outline Icon
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.

Or sign up using:

Already have an account?