Ive tried retyping....I just dont understand this error


#1



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":[],
    }


Lesson Number One error
#2

I had the same issue. You need to remove the brackets from the value of the name keys.


#3

That is very confusing, isn't the purpose of the brackets to HOLD and contain the contents of that Key, in the previous example there were more than 1 values within those brackets...........VERY CONFUSING


#4

All the variables stored to the dictionary don't have to be lists. Just storing "Lloyd" to "name" is just as correct as storing a number to it. It can be nearly anything!


#5

you can store many data types into a dictionary, look:

example = {
    "list": [1,2,3,4],
    "string": "a string",
    "integer": 5,
    "Boolean": True,
}

and for this exercise, the value for the name key should be a string.


#6

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