Set init() method to take four arguments


Can someone look at this basic code and see why am i getting "Did you set your init() method to take four arguments: self, angle1, angle2, and angle3?" error log?

class Triangle(object):
    def _init_(self, angle1, angle2, angle3):
        self.angle1 = angle1
        self.angle2 = angle2
        self.angle3 = angle3


Try it with __init__


@venkat87 The problem with your code is the fact you have one underscore on each side of the "init" function(underscore is this: _ in case to don't know). You should have two underscores on each side instead. Hope that help! :slight_smile:

-- @chipjumper36731


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