CommencerCommencer gratuitement

Solving real-world problems

Now you are going to use the functions you have learned to solve some real-life problems:

  1. You want to start investing and find a bond paying a 3% annual rate compounded monthly. If you invest USD 100 per month, how much will you have after five years?

  2. You are saving for a deposit on a house. You need to save up USD 15,000 and have saved USD 5,000 so far. If you save USD 250 per month, how many months until you reach your goal?

  3. You are 22 years old and want to retire at 65 with USD 1 million in the bank. If you can grow your money at 5% per year, how much should you invest per month?

Cet exercice fait partie du cours

Bond Valuation and Analysis in Python

Afficher le cours

Exercice interactif pratique

Essayez cet exercice en complétant cet exemple de code.

# Calculate how much USD 100 per month compounding at 3% grows to after 5 years
total_savings = npf.___(rate=____, nper=____, pmt=____, pv=____)
print(total_savings)
Modifier et exécuter le code