Home How to run a class function
 I was trying to write some code that would take in the number of sides of a polygon and a user can just randomly input the length of each side I wanted to make a separate class polygon and the following was my code: #numSides=int(input(Number of sides)) class polygon(object): def __init__(self,x): #useless code self.x=x #useless code self.x=[] #useless code def __inputSides__(self): #counter=0 #for i in range(x): # counter=counter+1 numSides=int(input("number of sides")) list_=[] for i in range(numSides): length=float(input("length")) list_.append(length) return list_ def __dispSides__(self,list_): for i in list_: print("side length",i) stone= polygon() stone.__dispSides__(4)  but then in the second to last line i was getting an error that said : Traceback (most recent call last): File "python", line 23, in TypeError: __init__() missing 1 required positional argument: 'x'  I was wondering how can i fix this and why I am getting this error? thanks!