Lesson number one



I've tried to come up with a more efficient way of creating these dictionaries. I've tried this in pycharm and it seems to create the dictionaries correctly. However, through the lesson, I am getting the follwing error. Any ideas why?

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

names = ["lloyd", "alice", "tyler"]

def create_dic(name):
    return {
        "name": name,
        "homework": [],
        "quizzes": [],
        "tests": [],

for word in names:
    globals()["%s" % word] = create_dic(word)


a function doesn't execute unless called, so you will need to call the function to create the dictionaries


Sorry! I hadn't copied in the last line of my code.
Let me edit it now.


i need more time with this problem, which i will have later today, i will come back to this


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