Question
python program Write a program that will calculate the future value of an investment with additional monthly payments. Your program will ask the user for
python program
Write a program that will calculate the future value of an investment with additional monthly payments. Your program will ask the user for the following items:
- Investment Amount
- Monthly Payment Amount
- Annual Interest Rate
- Entered as a percentage
- Example: A rate of 4.5% would be entered as 4.5, not 0.045
- Number of Years
Use the following formula
Do not do any calculations in the print statement. Use variables and assignment operators, then print the value of the appropriate variable. You can assume that the user will only enter valid non-negative numbers. Display the future value with two decimal places (cents). If you are within 1 cent, then you are ok. If your result does not show trailing zeros for the cents, it is ok (Ex. 10.50 shows as 10.5)
Investment Amount: $5,000
Monthly Payment: $500
Annual Interest: 6.0
Number of Years: 10
Future Value: $91,446.35
this is what I have so far but I'm getting the wrong output
InvestmentAmount = float(input('Enter the Investment Amount : ')) MonthlyPaymentAmount = float(input('Enter the Monthly Payment Amount: ')) AnnualInterestRate = float(input('Enter the Annual Interest Rate : ')) NumberOfYears = float(input('Enter the Number of Years : ')) MIR = AnnualInterestRate / 12.0 numOfMonth = NumberOfYears * 12.0 futureVal = InvestmentAmount * ((1 + MIR) ** numOfMonth) + MonthlyPaymentAmount * (((1 + MIR ** numOfMonth) - 1) / MIR) * (1 + MIR) print(futureVal)future Value = investment Amount x (1 + monthlyInterest Rate) "umbe nament Amo (1+monthlyInterest Rate)umber Of Months-1 -(1 + monthlyInterest Rate) monthlyInterest Rate
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