Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Step: 3

blur-text-image

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

Database Internals A Deep Dive Into How Distributed Data Systems Work

Authors: Alex Petrov

1st Edition

1492040347, 978-1492040347

More Books

Students also viewed these Databases questions

Question

2. What is the meaning and definition of Banking?

Answered: 1 week ago

Question

3.What are the Importance / Role of Bank in Business?

Answered: 1 week ago