7/9 Error, can't get letter grade to print


#1

Its strange, I have the average printing fine, but i can't get the letter grade.

print get_average(student)
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))


#2

same case cant able to print get_letter_grade


#3
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))

wish can help you, pay more attention on Indentation


#4
# Add your function below!
def average(numbers):
    total = float(sum(numbers))/len(numbers)
    return total
def get_average(student):
    return (0.1 * average(student["homework"]) + 0.3 * average(student["quizzes"]) + 0.6 * average(student["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"