number_of_sides = 3
if self.angle1 + self.angle2 + self.angle3 == 180:
def __init__(self, angle1, angle2, angle3): self.angle1 = angle1 self.angle2 = angle2 self.angle3 = angle3
The error message: “Oops, try again. It looks like your Triangle class doesn’t have a number_of_sides member variable.”
I’ve seen various other similar posts but I still fail to see why my code is incorrect as the variable number_of_sides surely is there. I’m slowly tearing my hair out, over this seemingly easy error.
Any idea of what I’m doing wrong?