Defining get_class_average in Part of a Whole


I have made sure everything else in my code is correct but when I submit my code it tells me I haven't defined the function "get_class_average". Am I missing something?

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


when function sees return statement at first iteration it halts the execution after appending the first average and it does not append other average values of students.

Indentation of return statement is not correct.
Make sure that function's header is 0-spaced.


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