8/9 Student Becomes the Teacher


For 8/9 Student Becomes the Teacher, do you know how I would calculate the get_average part? That would be step 3.


What information does the function get?
Given that information, how would you do that manually?
That's exactly how your function would do it.

If you're unsure of what the function is supposed to be doing, then you'll have to start with that. Can't start writing it before you know what it's supposed to do.


Well, the function is for the class average.


Are you asking what that is or does that mean you know what it's supposed to do?

If the former, I'd tell you to read the instructions, if the later, I'd tell you to start writing


My problem is that I'm not sure how to write code that calculates average or whatever step 3 is asking me to do.


Well start by establishing what it's supposed to do. You can't write anything without knowing what it's supposed to do.

So write down step by step in English what's supposed to happen.

def get_class_average(whatever input info is):
    # do this
    # do that
    # present result

Then you can start thinking about what the matching code is, you'll know some of it and other parts you'll be able to look up