1/9 Help


#1

Hey all,

Keep getting a Oops, try again. The name key does not have the value "Lloyd" in your lloyd dictionary.

lloyd = {
"name": ["Lloyd"],
"homework":[],
"quizzes":[],
"tests":[],
}

alice = {
"name":["Alice"],
"homework":[],
"quizzes":[],
"tests":[],
}

tyler = {
"name":["Tyler"],
"homework":[],
"quizzes":[],
"tests":[],
}


#2

Al indentations are correct. I don't get why when pasting code CodeCademy doesn't recognize it and display it exactly how I copy/paste it. Doesn't it make sense that that should be one of the biggest features of the help forums?


#3

to copy/paste code, paste it into the reply text box and select it all then press the </> button once all is highlighted, try this and re print. the preview tab on the right should show you the effect


#4

and regarding your question; if all indentations are correct, try removing the [ ] from the name: as it is technically not a list.


#5

Similar problem here:

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

students = ['Lloyd', 'Alice', 'Tyler']

It complains "Oops, try again. It looks like Lloyd is not in the students list."


#6

Oops, my bad, it should be:
students = [lloyd, alice, tyler]


#7

Remove the [ ] from the name and it should work (I had the same problem and this code worked):

lloyd = {
"name" : "Lloyd",
"homework" : [] ,
"quizzes" : [] ,
"tests" : []
}

alice = {
"name" : "Alice",
"homework" : [] ,
"quizzes" : [] ,
"tests" : []
}

tyler = {
"name" : "Tyler",
"homework" : [] ,
"quizzes" : [] ,
"tests" : []
}