Question: This is a python class. Question: Your code should allow the user to enter three values: a principle balance, an interest rate, and a number

This is a python class.

Question:

Your code should allow the user to enter three values: a principle balance, an interest rate, and a number of years.

For simplicity's sake, we will compound our interest once per year. In order to do so, create a function interest_calculator with three inputs, corresponding to the user inputs. They should have the default values 10000, .09, and 10, respectively.

Your formula to calculate the interest will be Balance(Year + 1) = Balance * (1 + interest rate)

So for example, starting with 10,000 and a 5% interest rate, the formula is 10,000 * (1 + .05) = 10,500. The next year would be 10,500 * (1 + .05) = 11,025 and so on.

Each year you will output the year number, and the value of the balance that year.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!