Did you create a dictionary named lloyd? Your code threw a "global name 'lloyd' is not defined" error. please halp


#1



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


Did you create a dictionary named lloyd? Your code threw a "global name 'lloyd' is not defined" error.
I cant get my code to run.


01. Create three dictionaries: lloyd, alice, and tyler.

  1. Give each dictionary the keys "name", "homework", "quizzes", and "tests".

  2. Have the "name" key be the name of the student (that is, lloyd's name should be "Lloyd") and the other keys should be an empty list. (We'll fill in these lists soon!)


llyod = {
    "name": "Llyod",
    "homework": [],
    "quizzes": [],
    "tests": [],
    }

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

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


#2

there is no dictionary named lloyd, check your spelling


#3

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