[Solved] obj.name() object is not callable [closed]

Learn Indentation a = int (input(“x”)) b = int (input (“y”)) c = int (input(“z “)) if a ==b==c: print (“all equal”) elif(a>b and a>c): print(“x is greatest”) elif(b>c and b>a): print(“y is greatest “) else : print(“z is greatest”) solved obj.name() object is not callable [closed]

[Solved] What is wrong with my class code [Python]?

You need to pass argument to your constructor. s1 = Square(1) # will call Square.__init__(self, 1) s2 = Square(2) # will call Square.__init__(self, 2) It’s not a big problem. Update I rewrite your class: import math class Square(): def __init__(self, length): #return an instance of this class with ‘length’ as the default length. self.length = … Read more