+1 (229) 255-3712
glass
pen
clip
papers
heaphones

  

You've been hired to develop a forecasting tool for a local bank that will let its customers project how much money they can earn if they invest at their institution. The tool should be designed to ask the user for how much they want to invest over a 3 year period, as well as the expected interest rate that they will earn each year and the estimated taxes they will pay on the interest earned. Here's are two sample runnings of the program – user input is underlined for your reference, but you do not need to replicate this in your own program:

**************************************************
      3 Year Bank Account Balance Forecast       
**************************************************
This program will project how much you could earn by investing money in
a bank account that pays out interest on a yearly basis.

To begin, enter how much money you would like to initially invest (i.e. 5000): 10000
Next, enter the expected interest rate for year 1. For example, enter 5 for 5%: 5
Finally, enter the tax rate on any interest earned this year. For example, enter 15.5 for 15.5%: 10

How much will you invest at the beginning of year 2? 10000
What is the expected interest rate for year 2? 6
What is the expected tax rate for interest earned in year 2? 11

How much will you invest at the beginning of year 3? 10000
What is the expected interest rate for year 3? 7
What is the expected tax rate for interest earned in year 3? 12

--- YOUR FORECAST ---

Year     Starting Balance             Deposit     Interest Earned     Tax on Interest      Ending Balance
1                    0.00           10,000.00              500.00               50.00           10,450.00
2               10,450.00           10,000.00            1,227.00              134.97           21,542.03
3               21,542.03           10,000.00            2,207.94              264.95           33,485.02

Total deposited:       $30,000.00
Total interest earned: $3,934.94
Total taxes due:       $449.92
**************************************************
      3 Year Bank Account Balance Forecast       
**************************************************
This program will project how much you could earn by investing money in
a bank account that pays out interest on a yearly basis.

To begin, enter how much money you would like to initially invest (i.e. 5000): 100000
Next, enter the expected interest rate for year 1. For example, enter 5 for 5%: 7
Finally, enter the tax rate on any interest earned this year. For example, enter 15.5 for 15.5%: 15.5

How much will you invest at the beginning of year 2? 35000
What is the expected interest rate for year 2? 9
What is the expected tax rate for interest earned in year 2? 12.7

How much will you invest at the beginning of year 3? 0
What is the expected interest rate for year 3? 4
What is the expected tax rate for interest earned in year 3? 10

--- YOUR FORECAST ---

Year     Starting Balance             Deposit     Interest Earned     Tax on Interest      Ending Balance
1                    0.00          100,000.00            7,000.00            1,085.00          105,915.00
2              105,915.00           35,000.00           12,682.35            1,610.66          151,986.69
3              151,986.69                0.00            6,079.47              607.95          157,458.21

Total deposited:       $135,000.00
Total interest earned: $25,761.82
Total taxes due:       $3,303.61

You can assume that the funds being invested each year are invested on the first day of the year, thus they will earn the full amount of interest for that year (i.e. if the user invests $100 at 5% interest they will earn $5 for the year). Note that in year 2 the starting balance of the account is equal to the ending balance for year 1, and in year 3 the the starting balance of the account is equal to the ending balance for year 2. Thus the user earns "compound interest" during the second and third years.

You can assume that the user will enter reasonable input values (i.e. all inputted values will be valid positive floating point numbers.) Ensure that your program is formatted correctly so that your values line up as in the sample output above (hint: use the format function or "f-strings".) You may not change the input prompts – for example, the program above asks the user to enter in the interest rate of 5% as 5. You cannot ask the user to enter in something else like 0.05 to indicate 5% interest.

Comment your source code and describe your code to someone who may be viewing it for the first time. Also include your name, the date, your class section and the name of your program at the top of your file.