Creating dictionary's


#1

My Code Doesn't work can anyone tell why ??

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

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

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

The name key does not have the value "Lloyd" in your lloyd dictionary
#2

After the name key, use use capital letter to begin writing the names eg "name":Lloyd", "name": "Alice" and "name": Tyler"


#3

Hi,
Thanks for reply bu that also didn't work


#4

the value for the name keys should be strings, not lists and have a uppercase fist letter

and your test key doesn't have a value, it should get an empty list as value


#5

Need to remove those [ ] bracket when you add an item to key 'name'.


#6

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