9. how is everybody doing?


#1


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

"Oops, try again. One of the following is missing or broken when we tried to use it: alice, lloyd, tyler, students, get_class_average, get_letter_grade"


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)    
    students = [lloyd, alice, tyler]
    print get_class_average(students)
    print get_letter_grade(get_class_average(students))


#2

Hi @steevlin,

You have three statements within the get_class_average function that should be moved outside it, namely this ...

    students = [lloyd, alice, tyler]

... and these ...

    print get_class_average(students)
    print get_letter_grade(get_class_average(students))

#3

got it, thanks for the help!


#4

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