Did you define Triangle's __init__() method to take the four arguments listed?


#1



Introduction to classes, Excercise 12 (Inheritance Syntax)


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 __int__(self,side1,side2,side3):
        self.side1=side1
        self.side2=side2
        self.side3=side3


#2

Hi ashish1610dhiman!
Looks like you have a simple typo!
on line 8 in your definition of the init method.
You've typed 'int' instead of 'init'
Hope this helps!
Joe


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.