Lesson 1


#1

Here is my code :

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

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

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

And here is the error :

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


#2

@dimensionrescuer

Take the names out of the lists, just have it as

dict_ = {'key': 'value'}

#3

Thank you, it worked


#4

what am i doing wrong ????:

lloyd={
"name":["Lloyd"],
"homework":[],
"quizzes":[],
"tests":[],
}
print lloyd["name"]
alice={
"name":["Alice"],
"homework":[],
"quizzes":[],
"tests":[],
}
print alice["name"]
tyler={
"name":["Tyler"],
"homework":[],
"quizzes":[],
"tests":[],
}
print tyler["name"]


#5

@locofelin

Do me a favor and just print your dict object as you have it, you might realize why you keep getting errors.

print(tyler + '\n' + alice + '\n' + lloyd)

After each one prints out study what is displayed vs what you want it to be stored as. Once you notice your discrepancy check out my previous comment and you should figure it out.


#6

thanks @zeziba,
me too stocked there & now after seeing ur opinion i got released
Thanks coding rocks