class Triangle(): def __init__(self,angle1,angle2,angle3): angle1=self.angle1 angle2=self.angle2 angle3=self.angle3 number_of_sides=3 def check_angles(self): if self.angle1+self.angle2+self.angle3==180: return True # print "lol" else: return False my_triangle=Triangle(90,45,45) print my_triangle.number_of_sides print my_triangle.check_angles()
The error message at right seems to point at the area of concern.
attributeError: Triangle instance has no attribute 'angle1'
Be sure the left side and right side of the assignments are as expected.
mtf and OP,
I have the same issue. mtf, left and right side are as expected and in my judgement correct.
The lesson seems to get very buggy after lesson 15.
I'm beyond frustrated