케이스 스터디: Python으로 소프트웨어 만들기
Mark Pedigo
Principal Data Scientist

BasicCalculator()FinancialCalculatorBasicCalculator를 상속class BasicCalculator:
def multiply(self, x, y):
result = x * y
return result
...
# Child of BasicCalculator
class FinancialCalculator(BasicCalculator):
def monthly_interest(self, annual_interest_rate):
return self.divide(annual_interest_rate, 12)
...
BasicCalculator → FinancialCalculator → MortgageCalculatorsuper() 사용class Animal:
def __init__(self, name):
self.name = name
class Dog(Animal):
def __init__(self, name):
# super calls __init__
# method from parent class
super().__init__(name)
케이스 스터디: Python으로 소프트웨어 만들기