Instantiate an Object Issues


#1

https://www.codecademy.com/en/courses/python-intermediate-en-WL8e4/3/3

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
        else:
            return False
            
my_triangle = Triangle(60,60,60)

print my_triangle.nubmer_of_sides


#2

'Triangle' object has no attribute 'nubmer_of_sides'

Notice the typing error in the above?


#3

Oh wow...thanks.

lesson learned...