Why is the average returned incorrect?

A post was split to a new topic: A decent explanation

can you please explian the difference?

Can anyone tell me why my class avg is 83.8 , and not 85?
def get_class_average(class_list):

results =

for student in class_list:

get_average(student)

results.append(get_average(student))

return average(results)

whole_class = [lloyd,alice,tyler]

print get_letter_grade(get_average(tyler))

print get_class_average(whole_class)

Thanks, the issue was same with me.I don’t understand why it is wrong to define the results outside the function.