18 lines
303 B
Python
18 lines
303 B
Python
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
|