Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I want to create a table using For loop by python. the table at beginning should input the initial capital, interest rate, year of investment.

I want to create a table using For loop by python. the table at beginning should input the initial capital, interest rate, year of investment. and compounding frequency. besides, the program also can calculate if investors withdraw their investment early. the procedure can display a 5% early withdrawal penalty and a final returns minus the penalty.

for loop only. the procedure should display a table as the example show. include the year, start balance, interest, and end balance, and calculate the new balance and interest rate in each year.

I had create a table, but it cannot display the change of start balance, interest, and end balance from second year.

thus, I want to know how to use for loop to create a table like this.

image text in transcribed
Part B Example 1: Amount of starting investment ($): 1000 Term of investment (# of years) : 5 Interest rate (%) : 2 Compounding frequency (times/year) : 12 Enter y if early termination: n year start balance interest end balance VIA WNY 1000.00 20.18 1020. 18 1020 . 18 20.59 1040.78 1040.78 21. 01 1061.78 1061.78 21.43 1083.21 1083.21 21. 86 1105.08 Part B Example 2 (Eary Withdrawal Penalty): Amount of starting investment ($): 1000 Term of investment (# of years) : 5 Interest rate (%) : 2 Compounding frequency (times/year) : 12 Enter y if early termination: y Enter early termination year #: 4 year start balance interest 1000.00 20. 18 end balance 1020. 18 1020. 18 20.59 1040 . 78 1040.78 21. 01 1061.78 1061.78 21.43 Early termination penalty = 54.16 1083 .21 Adjusted final balance (after early withdrawal penalty) = 1029.05

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Dental Assisting

Authors: Doni Bird, Debbie Robinson

13th Edition

978-0323624855, 0323624855

Students also viewed these Programming questions