Lesson Number One


#1

lloyd = {
"name": ["Hari"],

}
alice = {
"homework": [],

}
tyler = {
"quizes": [],
"tests": [],

}

Is there any wrong in my program
it was showing like this

Oops, try again. Did you give lloyd the homework key?


#2

Every student must have all the keys (they are each the same kind of dictionary).

You have given Lloyd only name, Alice only homework, and Tyler only quizes and tests.

All three should have name, homework, quizzes, and tests.


#3

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

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

could any tell me where my program went wrong?


#4

To make a string you don't need to use []. The square brackets are just for lists, but each student doesn't have a list of names just one name :p

e.g. instead of ["Lloyd"] you can just write "Lloyd"


#5

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