- 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())

14th Dec 2017, 12:49 PM
Ibrahim
Ibrahim - avatar
1 ответ
+ 1
the function n_m needs two parameters but you call it with only one parameter (100)
1st Jan 2018, 3:59 PM
michal