Part of the whole helpp! [8. Part of the Whole]



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

so results.append(get_average(student)) clearly needs to be part of the loop, is it in your case?


I’m getting the same error, but as far as I understand my results.append(get_average(student)) is in my loop


At the end of a function None is returned by default

we can return something else at the end of our function by using the return keyword. Which means a function ends the moment a return keyword is reached

so your function ends in the first iteration of the loop, but to get the correct class average the loop needs to make all its iteration

Now, with this newly gained knowledge, how would you achieve this?


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