- 1
Anyone Can Solve This Problem? (In the below function some mistake. please solve and put correct answer.)
class Rectangle: def __init__(s, a, b, c): s.a = a s.b = b s.c = c def x_y(s): return s.a * s.b * s.c @classmethod def n_m(cls, side_length,sde_length): return cls(side_length, side_length,sde_length) m = Rectangle.n_m(100) print(m.x_y())
1 Odpowiedź
+ 1
the function n_m needs two parameters but you call it with only one parameter (100)