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


#1

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:
--------results.append(get_average(student))
----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!


#2

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

EXAMPLE:

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

#3

Thank you!

Its works perfectly now :smile: