FAQ: Learn Python: Student Becomes the Teacher - How is Everybody Doing?

This community-built FAQ covers the “How is Everybody Doing?” exercise in Codecademy’s lessons on Python.

FAQs for the Codecademy Python exercise How is Everybody Doing?:

Join the Discussion. We Want to Hear From You!

Have a new question or can answer someone else’s? Reply (reply) to an existing thread!

Agree with a comment or answer? Like (like) to up-vote the contribution!

Need broader help or resources about Python in general? Go here!

Want to take the conversation in a totally different direction? Join our wider discussions.

Learn more about how to use this guide.

Found a bug? Report it!

Have a question about your account, billing, Pro, or Pro Intensive? Reach out to our support team!

None of the above? Find out where to ask other questions here!

A post was split to a new topic: The reasoning behind why the code on lines 51 and 53

Hello! I just completed Student becomes the teacher 9. How is everybody doing.

But the window to the right is off.
Score is 83.866…
But grade says “A”

It should be “B” according to the code. Please help me understand this.

@cssace50470 I just had this issue as well, then figured it out.

Your screenshots show that you are calculating the class average on line 54, then getting a letter grade for all of the students’ scores on line 55. What you intend to do is calculate the letter grade of the average – not the letter grade of all scores.

If you change line 54 to the following, your console would print the correct letter grade.

print get_letter_grade(get_class_average(students))

To show the steps a bit more clearly, I actually prefer the code like this:

students = [alice, lloyd, tyler]
class_number_grade = get_class_average(students)
print class_number_grade
class_letter_grade = get_letter_grade(class_number_grade)
print class_letter_grade

That way, it is quite clear that I am calculating the class’ number grade, then calculating the corresponding letter of the class’ number grade.


I don’t quite understand what is happening here.

def get_class_average(lloyd):
  results = []
  for student in lloyd:	
    student_avg = get_average(student)
  return average(results)

To begin with lloyd is taking in as an argument in def_get_class_average. We have a for loop that takes the averages of homework, tests and quizzes for Lloyd and appends them in the empty list results .
But then it returns average? Where does average come from? It is not used in the code so why is it even there?

in line end, it must be print get_letter_grade(get_class_average(student)) instead of

1 Like