16.Class It Up -- Oops, try again. It looks like your Triangle class doesn't have a number_of_sides member variable


class Triangle(Name):
    number_of_sides = 3
    def __init__(self, angle1, angle2, angle3):
        self.angle1 = angle1
        self.angle2 = angle2
        self.angle3 = angle3
    def check_angles():
        sumatoria = self.angle1 + self.angle2 + self.angle3
        if sumatoria == 180:
            return True
            return False

Gives an error that I can't understand


your check_angles method needs to have a self parameter, otherwise we can't access the instance variable through self


Still doesn't work and gives the same error but you're accurate on your feedback.

What do I do?



class Triangle(Name):

your class should inherit from object. object contains the basic information about classes


Thank you!! It worked