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


#1


#2

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?


#3

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


#4

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?


#5

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