Class it up check angles


When I submit my code, I encounter the following error:
Oops, try again. It looks like your check_angles method doesn't return True for valid triangle angle values.

class Triangle(object):
    def __init__(self,angle1,angle2,angle3):
    def check_angles(self):
        return self.angle1+self.angle2+self.angle3==180


This is a Triangle class, meaning the angles are not fixed, but set from the supplied parameters.

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


Thanks! It helped, I was able to complete the lesson!


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