Answered step by step
Verified Expert Solution
Question
1 Approved Answer
please compute the following code Instructions: After creating a new script file called retirement m you are then tasked with creating a program that considers
please compute the following code
Instructions: After creating a new script file called retirement m you are then tasked with creating a program that considers two different retirement plans and plots the balance of each plan over time. Your program should do the following: I. Input an initial balance, a monthly interest rate, and a balance vector for sach of two different retirement plans. These variables can be adjusted to compare any two accounts by the user of the script. vector that contains integers 0,1,2,3,...,360. considered (361 becauset-0 is one, and tot-360 represents 360 more entries) which (see below). 2. A time vector should be created that contains months 0 through 360 months (30 years). That is, it will be a 3. A for' loop is run over the 360 months, and 361 balances are recorded for each of the two accounts being hi ole,aa egamasalea wich as 5. An output should report the two balances (to the nearest penny) after 360 months, of the form: a. "The balance of account be fter 30 years." b. "The balance of account 2 will be after 30 years." NOTE: The output tends to appear above the graphic, even though the graphic is executed first. This is okay. Here is a sample graph of what should appear exactly when you check script with the parameters that follow. For this test case, the initial balances of the two sample accounts are $200 and $300, the interest rates are 0.5% and 0.75%, and the monthly deposits are $250 and $200, respectively: The balance of account 1 will be $252333.28 after 30 years The balance of account 2 will be $370567.87 after 30 yearsStep 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