1. Learn
  2. /
  3. Projects
  4. /
  5. Case Study: Building Software in Python

Connected

Exercise

Add a method to an inherited class

Let's add a method to the MortgageCalculator to calculate the monthly payment given a principal amount, an annual interest rate, and the number of years to pay off the loan.

Instructions 1/3

undefined XP
    1
    2
    3
  • Divide numerator by denominator and save the result to multiplier.