Appreciate some guidance


#1

Been fighting with this all afternoon. Error message: Oops, try again. get_class_average([alice, lloyd]) returned 91.15 instead of 85.85 as expected**

I'd appreciate some guidance. Thanks in advance!

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

Part of the Whole
#2

The return statement should not be inside the loop code body.


#3

Thanks a bunch! I really appreciate it!


#4

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