class Calculator:
    def add(self, a, b):
        return a + b

    def subtract(self, a, b):
        return a - b

class ScientificCalculator(Calculator):
    def square(self, n):
        return n ** 2

    def power(self, n, m):
        return n ** m

calc = ScientificCalculator()

print(calc.add(5, 3))      
print(calc.subtract(10, 4))
print(calc.square(4))      
print(calc.power(2, 5                                                                                                                                                               ))

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: