1. A method header written without self
the method, and every autograder test that calls it: TypeError, average() takes 0 positional arguments but 1 was givenWhat not to write
“def average(): return sum(self.marks) / len(self.marks)”
What to write
“def average(self): return sum(self.marks) / len(self.marks)”, and the call stays ana.average() with nothing between the brackets.
Why: The call ana.average() looks as though it passes nothing, and it passes ana. The message says 1 was given because the object IS the argument, and the header declared no parameter to receive it.