Instantiate an Object Issues


Traceback (most recent call last):
File "python", line 15, in
AttributeError: 'Triangle' object has no attribute 'nubmer_of_sides'

I expect it to print "3" on my display but instead I keep getting the above error, and the hint isn't getting me anywhere!!

class Triangle(object):
    def __init__(self,angle1,angle2,angle3):
        self.angle1 = angle1
        self.angle2 = angle2
        self.angle3 = angle3
    number_of_sides = 3
    def check_angles(self):
        if self.angle1 + self.angle2 + self.angle3 == 180:
            return True
            return False
my_triangle = Triangle(60,60,60)

print my_triangle.nubmer_of_sides


'Triangle' object has no attribute 'nubmer_of_sides'

Notice the typing error in the above?


Oh wow...thanks.

lesson learned...