I am am having a really hard time with part 4 in the student becomes the teacher section, where it says 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

Which I did but I am still getting errors and I don't get what I am doing wrong.


Post your full code!


this is the full code.


I mean copy paste your code so I can test it and find where you making mistake! :slight_smile:



The exercise implies a loop that iterates over each student dictionary.

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

We can even elaborate on this to make it more dynamic:

for student in students:
    for key in student:
        print key, student[key]

However, there is no guarantee of which order the keys will print,


It still doesn't work


Please post your raw code (not a screenshot). Thanks. It would also help to have a link to the exact exercise.


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