Class it Up Exercise


Hi. Could someone help me out?

I keep getting an error code that says

"Oops, try again. Make sure to pass self as an argument to your check_angles method!"

and i don't know why. My code is below.

class Triangle(object):

    def __init__(self, angle1, angle2, angle3):
        self.angle1= angle1
        self.angle2= angle2
        self.angle3= angle3
    def check_angles(self):
        if sum(self.angle1,self.angle2,self.angle3)==180:
            return True
            return False


sum() is for an iterable (like a list), to add numbers (variables containing numbers) together, simply use +


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.