Answered step by step
Verified Expert Solution
Question
1 Approved Answer
please use for loop and if else only and please include the code for the graph !!! Part 2: How much will
please use "for loop" and" if else" only and please include the code for the graph!!!
Part 2: How much will I have for retirement? Your second calculator will compare the retirement nest eggs that result from making two different monthly investments in a retirement fund. Your program should prompt for the following inputs: the initial balance in the retirement account the current age of the investor the desired retirement age of the investor the expected nominal annual rate of return on the investment two monthly investment amounts Then write a function compare Investments (balance, age, retireAge, rate, monthly1, monthly2) that computes the final balance in the retirement account, for each monthly in- vestment, when the investor reaches his or her retirement age. The interest on the current balance should compound monthly at a rate of rate / 100 / 12. The function should plot the growth of the retirement account balance for both monthly investment amounts, and then print the two final balances along with the additional amount that results from the higher monthly investment. For example, your output might look like this: 4.8 PROJECTS P4.2-3 Initial balance: 1000 Current age: 20 Retirement age: 70 Nominal annual percentage rate of return: 4.2 Monthly investment 1: 100 Monthly investment 2: 150 The final balance from investing $100.00 per month: $212030.11. The final balance from investing $150.00 per month: $313977.02. If you invest $50.00 more per month, you will have $101946.91 more at retirement. 350000 $100.00 per month $150.00 per month 300000 250000 200000 Account balance (5) 150000! 100000 50000! 20 25 30 35 40 50 55 60 65 70 45 AgeStep 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