BaşlayınÜcretsiz Başlayın

Calculating the payment amount

Another real-life problem you might encounter is how much money you need to save each month to hit a financial target within a set time.

You saw earlier that to pay off a mortgage of USD 275,000 in ten years with an annual interest rate of 3.5% compounded monthly, you needed to pay USD 2,719 per month.

If, instead, you wanted to take twenty years to pay off the mortgage, calculate how much you would need to pay per month now.

Bu egzersiz

Bond Valuation and Analysis in Python

kursunun bir parçasıdır
Kursu Görüntüle

Egzersiz talimatları

  • Import the numpy_financialpackage using the alias npf.
  • Use the npf.pmt() function to calculate the required monthly payment and save this to required_return.
  • Print the result.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Import the numpy_financial package using the alias npf
____

# Calculate monthly payment required
required_payment = ____

# Print the result
____
Kodu Düzenle ve Çalıştır