Part of a whole


it says: Make sure you have defined get_class_average

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


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.


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