All problems
MediumOOP
@staticmethod
Add a static method `MathUtil.square(x)` that returns x*x.
- #staticmethod
- #decorator
Sample input
MathUtil.square(7)
Sample output
49
class-static-method.py
Output
Press "Run code" to execute.
Loading…
Add a static method `MathUtil.square(x)` that returns x*x.
MathUtil.square(7)
49
Press "Run code" to execute.