self.grades variable is just a list with 2
Grade objects in it.
print(S.grades) Output: [<__main__.Grade object at 0x7f150a301668>, <__main__.Grade object at 0x7f150a3016a0>]
And if I try to do any kind of calculation on these
Grade objects I get an error
S.grades + S.grades Output: File "script.py", line 25, in <module> S.grades + S.grades TypeError: unsupported operand type(s) for +: 'Grade' and 'Grade'
I get the same error if I try to do the calculation in the
get_average method in the
Could you maybe provide an example of how I could preform calculations on these objects?