You are viewing a single comment's thread. Return to all comments →
My solution with OOP and maximizing complexity
class Operations(): def __init__(self, number_a: int, number_b: int): self.number_a = number_a self.number_b = number_b def __add__(self): return self.number_a + self.number_b def __sub__(self): return self.number_a - self.number_b def __mul__(self): return self.number_a * self.number_b if __name__ == '__main__': a = int(input()) b = int(input()) result = Operations(a, b) print(f'{result.__add__()}\n{result.__sub__()}\n{result.__mul__()}')
Seems like cookies are disabled on this browser, please enable them to open this website
Arithmetic Operators
You are viewing a single comment's thread. Return to all comments →
My solution with OOP and maximizing complexity