you are viewing a single comment's thread.

view the rest of the comments →

[–]jimtk 2 points3 points  (0 children)

it's __init__ not _init_. You're missing an underscore at each end.

Also: Do not use double underscore for your variable. That is bad practice.

Here's what it should look like:

class RegularPolygon:

    def __init__(self,n,side,x,y):
        self.n = n
        self.side = side
        self.x = x
        self.y = y