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


#1



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

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


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


#2

Remember, they want us to make an empty list for homework, quizzes, and tests. You forgot to do that.


#3

Yep.
here is what works:

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

you simply did not make specific lists or something.


#4

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