4. For the record / Student becomes the teacher

students = [lloyd, alice, tyler]
for student in students:
    print "Student's name: %s" % student["name"]
    print "Student's homework: %s" % student["homework"]
    print "Student's quizzes: %s" % student["quizzes"]
    print "Student's tests: %s" % student["tests"]

Get the error: "Oops, try again. Did you print out each student's name? It looks like "Lloyd" wasn't printed." even though Lloyd is being printed in the console. any idea why?


im getting the same thing and have tried it a few different ways, no clue


just remove the string printing in front of the variable then it passes, all its looking for is, print student[name]
and the other variables of course, nothing else


Wow that worked -.- I tried to do it the hard way to test my knowledge and it impeded me. Thanks for the reply!


hah my pleasure, ya I have found that for things even as simple as capitalizing the first letter of a name sometimes thats enough to make the checker fail.


Another option. This passed for me.

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],
"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]
for student in students:
print student["name"]
print student["homework"]
print student["quizzes"]
print student["tests"]


Right ! I did the same as Codecademynoob, which I find cleaner than "%s..."


all i had for my code when it passed is

students = ['lloyd', 'alice', 'tyler']

then pressed submit