Question
PYTHON Language Function 7: Investment Calculator Write a function investment(PMT, n, i) that calculates your customer's savings at some point in the future, if: >
PYTHON Language
Function 7: Investment Calculator
Write a function investment(PMT, n, i) that calculates your customer's savings at some point in the future, if:
> an amount is invested at the END of every year, starting with amount of PMT at the end of this year,
> at an interest rate of i% per year, compounded annually,
> the investment amount doubles every second year (cumulatively).
IMPORTANT: Your function may not call any of the other functions you've defined in this project. or impoer any packages
# YOUR CODE HERE return round(investment_balance, 2) ### END FUNCTION 7
IMPORTANT: Your function needs to return an float value correctly rounded to 2 decimal places.
If your answer is not rounded correctly to 2 decimal places, you will receive 0 for the question.
Make sure that the following tests all give a True result:
investment(15000, 30, 0.1045) == 1954935238.47
investment(10000, 40, 0.1045) == 41728281751.16
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started