4. For the Record (Please can someone look at this problem) :)


#1

This was the task:
for each student in your students list, print out that student's data, as follows:

print the student's name
print the student's homework
print the student's quizzes
print the student's tests

My Code:
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 "Students Name: %s" % student["name"]
print "Students Homework: %s" % student["homework"]
print "Students Quizzes: %s" % student["quizzes"]
print "Students Tests: %s" % student["tests"]
print #This print creates a space making the code look clean

Error which i recieved:
Oops, try again. Did you print out each student's name? It looks like "Lloyd" wasn't printed.

My Output:
Students Name: Lloyd
Students Homework: [90.0, 97.0, 75.0, 92.0]
Students Quizzes: [88.0, 40.0, 94.0]
Students Tests: [75.0, 90.0]

Students Name: Alice
Students Homework: [100.0, 92.0, 98.0, 100.0]
Students Quizzes: [82.0, 83.0, 91.0]
Students Tests: [89.0, 97.0]

Students Name: Tyler
Students Homework: [0.0, 87.0, 75.0, 22.0]
Students Quizzes: [0.0, 75.0, 78.0]
Students Tests: [100.0, 100.0]

None

(See i dont see what is the problem despite it doing the job.)


#2

Try printing only the data with no textual embellishment.


#3

Thank you I've just figured it out, just had issues with formatting.


#5