EDIT: Figured out that I was reassigning individual_ averages for each key, and had to make results.append part of the loop to add it each time.
Although, previously it was giving errors along the lines of "float cannot be used as parameter with append", and i've no idea why it would do that either. It also simply gave the error ([alice)] returned (the wrong average). I can't really replicate it because I've basically been repeatedly typing in what I though the code should be up until now.
Student Becomes the Teacher - Part of the Whole
I've had tons of errors on this, but the one I'm getting right now is "oops, get_class_average([alice, lloyd]) returned (lloyd's average) instead of (the average of both of them)",
Been at this for at least an hour, starting to go a little mad, would appreciate an explanation of why my code is faulty.
def get_class_average(students) results =  for student in students individual_averages = get_average(student) results.append(individual_averages) return average(results)
By the way, is there any way to copy and paste the python code out of the thingy, using a mac and it is not working at all.