Student Becomes The Teacher: Lesson One


#1



https://www.codecademy.com/courses/python-beginner-en-qzsCL/0/1?curriculum_id=4f89dab3d788890003000096

Looks like i hae everything perfectly even read some posts after and the code looks the same and the correct ones. Might be one small thing off cause I keep getting this annoying error.

Thanx for the future help guys!

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

For this property, just use a string literal:

    "name": "Lloyd",

The same applies to the other two dictionaries, as well.


#3

Thanks alot......I must be tired because I could swear I took them off lol.


#4

Oops, try again. Did you create a dictionary named lloyd? Your code threw a "global name 'lloyd' is not defined" error.

getting this error now with a small arrow pointing at the commas. sigh


#5

The last member in a dictionary does not need a comma at the end. Please re-post your code so we can look for other possible explanations. Thank you.


#6

`lloyd = {

"name": "Lloyd",
"homework":[],
"quizzes":[],
"tests":[],

}

alice = {

"name": "Alice",
"homework":[],
"quizzes":[],
"tests":[],

}

tyler = {

"name": "Tyler",
"homework":[],
"quizzes":[],
"tests":[],

}`

Ok I the problem! This time it was the return space lines between { and "name" then "tests":[], and }.


#7

So you're good, now?


#8

Thanks for all your help :slight_smile:


#9

3 posts were split to a new topic: Still not running, help, thanks!


#10