1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
class Calculator: def __init__(self): pass def add(self, a, b): return a + b def sub(self, a, b): return a - b def mul(self, a, b): return a * b def div(self, a, b): return a / b def exp(self, num1, num2): return num1 ** num2