Keeps returning an error saying "
Oops, try again. Did you create an instance of Triangle called my_triangle?"
The console error says "Traceback (most recent call last):
File "python", line 18, in
File "python", line 3, in init
AttributeError: 'int' object has no attribute 'self'"
I'm going to guess I'm missing something very obvious here, but it is currently about 4am...
class Triangle(object): def __init__(self, angle1, angle2, angle3): angle1.self = angle1 angle2.self = angle2 angle3.self = angle3 number_of_sides = 3 def check_angles(angle1, angle2, angle3): sum_of_angles = 0.0 sum_of_angle = sum(angle1, angle2, angle3) if sum_of_angle == 180: return True else: return False my_triangle = Triangle(90,10,80) print my_triangle.number_of_sides print my_triangle.check_angles()