Inheritance Syntax - throw us a bone!


#1

Hey guys, trying to figure out what is wrong with this code:

class Shape(object):
    """Makes shapes!"""
    def __init__(self, number_of_sides):
        self.number_of_sides = number_of_sides

# Add your Triangle class below!
class Triangle(Shape):
    def __innit__(self, side1, side2, side3):
        self.side1 = side1
        self.side2 = side2
        seld.side3 = side3

Any help would be great. Thanks!


#2

def __innit__(self, side1, side2, side3):

you misspelled init


#3

Thanks @stetim94!

Still not working, any other observations?

class Shape(object):
    """Makes shapes!"""
    def __init__(self, number_of_sides):
        self.number_of_sides = number_of_sides

# Add your Triangle class below!
class Triangle(Shape):
    def __init__(self, side1, side2, side3):
        self.side1 = side1
        self.side2 = side2
        seld.side3 = side3

#4

another typo:

seld.side3 = side3

you see the typo in this line?


#5

my bad, cheers mate.


#6