#1

error messages:
"Oops, try again. Your code looks a bit off, see the console window for the error message!"

I think this code should work , but it can't.
and I can't find the problem...

``````lloyd = {
"name": "Lloyd",
"homework": [90.0, 97.0, 75.0, 92.0],
"quizzes": [88.0, 40.0, 94.0],
"tests": [75.0, 90.0]
}
alice = {
"name": "Alice",
"homework": [100.0, 92.0, 98.0, 100.0],
"quizzes": [82.0, 83.0, 91.0],
"tests": [89.0, 97.0]
}
tyler = {
"name": "Tyler",
"homework": [0.0, 87.0, 75.0, 22.0],
"quizzes": [0.0, 75.0, 78.0],
"tests": [100.0, 100.0]
}

def average(nums):
total = sum(nums)
total = float(total)

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

if scroe>=90:
return "A"
if scroe>=80:
return "B"
if scroe>=70:
return "C"
if scroe>=60:
return "D"
return "F"

#2

here:

``if scroe>=90:``

you misspelled score

in fact, in all condition within get_letter_grade function you misspelled score

#3

Typos aplenty. Need to check spelling throughout.

#4

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