Issue for Part of the whole


#1



https://www.codecademy.com/en/courses/python-beginner-en-qzsCL/1/4?curriculum_id=4f89dab3d788890003000096

Hello, I have the following message and I can't find the solution: "Oops, try again. get_class_average([alice, lloyd]) returned 91.15 instead of 85.85 as expected"


def average (numbers):
    total = sum(numbers)
    return float(total) / len(numbers)
    
def get_average (student):
    homework = average(student["homework"])
    quizzes = average(student["quizzes"])
    tests = average(student["tests"])
    return 0.1*homework + 0.3*quizzes + 0.6*tests
    
def get_letter_grade (score):
    if score >= 90:
        return "A"
    elif score >= 80:
        return "B"
    elif score >= 70:
        return "C"
    elif score >= 60:
        return "D"
    else:
        return "F"
    print get_letter_grade(get_average(lloyd))
    
def get_class_average (students):
    results = []
    for student in students:
        results.append(get_average(student))
        return average(results)


#2

Your only problem is indentation on the last line.

Instead of

for student in students:
        results.append(get_average(student))
        return average(results)

Try

for student in students:
        results.append(get_average(student))
return average(results)

#3

It works thanks a lot !!!