Lesson Number One error


#1

Hello, I am getting a "The name key does not have the value "Lloyd" in your lloyd dictionary." error, although it is there and I cannot see any typos.. any ideas?

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

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

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


#2

please read this topic:

someone has the exact same problem, it also contains the solution


#3

Oh sorry for double posting. I see but I do not understand why the [] are omitted. I thought {}, [], () are needed in order to define for lists, dictionaries, tuples etc.


#4

yes, but from the instructions:

Have the "name" key be the name of the student (that is, lloyd's name should be "Lloyd"

as you can see, "Lloyd" is as string. so it should be a string, not a list. If the exercise required the name value to be a list, then you should have use [] indeed


#5

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