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


#1

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
        else:
            return False

Gives an error that I can't understand


#2

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


#3

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

What do I do?


#4

here:

class Triangle(Name):

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


#5

Thank you!! It worked


#6