7/9 Sending a letter


#1



Although the code works, the average printed 80.55 for Lloyd yet he still receives an A. Any suggestions?


I expected Lloyd to receive a B.


def get_average(student):
    homework = average(student["homework"])
    quiz = average(student["quizzes"])
    test = average(student["tests"])
    return homework * 0.1 + quiz * 0.3 + test * 0.6

def get_letter_grade(score):
    if score >= 90.0:
        return "A"
    elif score >= 80.0:
        return "B"
    elif score >= 70.0:
        return "C"
    elif score >= 60.0:
        return "D"
    else:
        return "F"

print get_average(lloyd)
print get_letter_grade(lloyd)


#2

Hi try it like that..

print get_letter_grade(get_average(lloyd))