Triangle class doesn't have a number_of_sides member variable


#1

Not sure what's wrong with my class variable declaration ( number_of_sides = 3) and
(def init(self, angle1, angle2, angle3):slightly_smiling: statement.

'''class Triangle(object):
number_of_sides = 3

def __init__(self, angle1, angle2, angle3):


    self.angle1 = angle1
    self.angle2 = angle2
    self.angle3 = angle3

def check_angles(self.angle1, self.angle2, self.angle3):

    sum = (self.angle1 + self.angle2 + self.angle3)
    if sum == 180:
        return True
    else:
        return False

'''


#2

Hi here

def check_angles(self.angle1, self.angle2, self.angle3):

Your def check_angles() should take as argument just self


#3

That worked but I'm wondering why the function only needs the self instance of the class?

Thanks for quick help marco.