Class it up


Hello everyone,
I am getting this error this my code.
Oops, try again. It looks like your check_angles method doesn't return True for valid triangle angle values."""

class Triangle(object):
number_of_sides = 3
def init(self, angle1, angle2, angle3):
self.angle1 = angle1
self.angle2 = angle2
self.angle3 = angle3

def check_angles(self):
    if self.angle1 + self.angle2 + self.angle3 == 180:
        print True
        print False

What is wrong?


you print True if the 3 angles have an angle of 180 degrees, you don't return True


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