8/9 - get_class_average([alice]) should return a number


Hi All,

Having some trouble with this one. I've checked some other posts and can't tell what I am doing wrong. The only code I have added to the base exercise is:

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

When I run it, I get the error "Oops, try again. get_class_average([alice]) should return a number".

Thank you, and happy Canadian Thanksgiving!


You have to average the list again. If you don't you are returning a list instead.


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


Thank you!

Its works perfectly now :smile: