Part of a whole


#1

https://www.codecademy.com/courses/learn-python/lessons/student-becomes-the-teacher/exercises/part-of-the-whole

it says: Make sure you have defined get_class_average

def get_class_average(class_list):
    results = []
    for student in class_list:
      results.append(get_average(student))
      return average(results)

#2

Hi @ex-parrrot,

This statement is indented too much, making it part of the for loop …

      return average(results)

Align that statement with the for loop header, so that it is no longer part of the loop.

There could be other problems as well that would prevent the function definition from being recognized, but we cannot find those problems without seeing the code that precedes the function definition.


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.