16/18 Class it up


#1



I can't figure out why this code doesn't work
It gives the error: Your code threw the following error when it tried to check Triangle: global name 'Triangle' is not defined


class Triangle(object):
    number_of_sides = 3
    def __init__(self, angle1, angle2, angle3):
        self.angle1 = angle 1
        self.angle2 = angle 2
        self.angle3 = angle 3
    def check_angles(self):
        if self.angle1 +self.angle2 + self.angle3 == 180:
            return True
        else:
            return False


#2

here:

        self.angle1 = angle 1
        self.angle2 = angle 2
        self.angle3 = angle 3

you can't just add spaces to variable names, this should be angle1, angle2 and angle3


#3

changed it and it's correct, thank you!!


#4