Student become a teacher


#1

PLEASE HELP OUT!!!ASKED TO PRINT STUDENT'S NAME,HOMEWORK,QUIZZES AND TESTS AND I USED THE 'PRINT STUDENT' STATEMENT BUT IT'S TELLING ME IT DIDN'T PRINT INFO OF LLOYD IN THE CONSOLE
lloyd = {
"name": "Lloyd",
"homework": [90.0,97.0,75.0,92.0],
"quizzes": [88.0,40.0,94.0],
"tests": [75.0,90.0]
}
alice = {
"name": "Alice",
"homework": [100.0, 92.0, 98.0, 100.0],
"quizzes": [82.0, 83.0, 91.0],students
"tests": [89.0, 97.0]
}
tyler = {
"name": "Tyler",
"homework": [0.0, 87.0, 75.0, 22.0],
"quizzes": [0.0, 75.0, 78.0],
"tests": [100.0, 100.0]
}
students = [lloyd,alice,tyler]


#2

for stu in students:
value = {}
if(stu == "alice"):
value = alice
elif(stu == "lloyd"):
value = lloyd
else :
value = tyler
print value["name"]
print value["homework"]
print value["quizzes"]
print value["tests"]
My code.
I think, this is bad way :||. I want to the good method


#3

students = [lloyd,alice,tyler]

for kids in students:
print kids['name']
print kids['homework']
print kids['quizzes']
print kids['tests']