2/9 I know it's easy, but I can't get this to work


#1

I've looked over this for 10 minutes. I can't see any sign of error. Please help!

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]
}

Oops, try again. Lloyd's quizzes key should have the value [88.0, 40.0, 94.0].


#2

Hello @miksterias.

Just make this three dictionaries names to lowercase.
But don't change the "name" value!

Example: Lloyd -> lloyd:

lloyd = {
    "name": "Lloyd",
    "homework": [90.0, 97.0, 75.0, 92.0],
    "quizzes": [88.0, 40.0, 94.0],
    "tests": [75.0, 90.0]
}

#3

It must've just been some sort of glitch, because I went back to check my
code after you replied, and I clicked save & submit and it was fine. But
thanks for the help anyways :slight_smile:


#4

@netscum is right, the variable names should be all lower case. You had created them with the correct names but incorrect values before, and then you fixed the values but messed up the names. So the error message was referring to what was no longer in your code but still in memory.
When you later refreshed the page, the variables with the correct names were gone. When the submission test tried to access them, it got a NameError as they weren't there, this caused the submission test to crash, and passed you.


#5

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