Question

In: Computer Science

6. Compound Interest When a bank account pays compound interest, it pays interest not only on...

6. Compound Interest
When a bank account pays compound interest, it pays interest not only on the principal amount that was deposited into the account, but also on the interest that has accumulated over time. Suppose you want to deposit some money into a savings account, and let the account earn compound interest for a certain number of years. The formula for calculating the balance of the account after a specified number of years is:

? = ?(1 + ?)???

The terms in the formula are:
A is the amount of money in the account after the specified number of years.P is the principal amount that was originally deposited into the account.
r is the annual interest rate.
n is the number of times per year that the interest is compounded.
t is the specified number of years.

Write a program that makes the calculation for you. The program should ask the user to
input the following:
• The amount of money you want to make in the account after the specified number of years.
• The annual interest rate paid by the account as a decimal number.
• The number of times per year that the interest is compounded (For example, if interest
is compounded monthly, enter 12. If interest is compounded quarterly, enter 4.)
• The number of years the account will be left to earn interest
Once the input data has been entered, the program should calculate and display the principal amount you have to deposit into the account.

Solutions

Expert Solution

#In python

A=float(input('Enter amount of money you want to make in the account after the specified number of years: '))
r=float(input('Enter annual interest rate paid as a decimal: '))
n=int(input('Enter number of times per year the interest is compounded:'))
t=int(input('Enter number of years the account will be left to earn interest: '))

P=A/(1+r/n)**(n*t)

print('Principal amount you have to deposit into the account: ${:.2f}'.format(P))


Related Solutions

When a bank account pays compound interest, it pays interest not only on the principal amount...
When a bank account pays compound interest, it pays interest not only on the principal amount that was deposited into the account, but also on the interest that has accumulated over time. Suppose you want to deposit some money into a savings account, and let the account earn compound interest for a certain number of years. The formula for calculating the balance of the account after a specified number of years is: A=P (1+rn)ntA=P (1+rn)nt The terms in the formula...
Simple Interest versus Compound Interest First City Bank pays 10% simple interest on its savings account...
Simple Interest versus Compound Interest First City Bank pays 10% simple interest on its savings account balances; whereas, Second City Bank pays 10% interest compounded annually. If you made $6,000 deposit in each bank, how much more money would you earn from your Second City Bank account at the end of 10 years; and, what is the amount for First City Bank? What is the simple interest amount for First City Bank; What is the amount of compound interest for...
If you deposit $10,000 in a bank account that pays 6% interest annually, how much will...
If you deposit $10,000 in a bank account that pays 6% interest annually, how much will be in your account after 5 years (to two decimal places)? Answer to the nearest cent xxx.xx and enter without the dollar sign.
Bank A pays 7% interest compounded annually on deposits, while Bank B pays 6% compounded daily....
Bank A pays 7% interest compounded annually on deposits, while Bank B pays 6% compounded daily. a. Based on the EAR (or EFF%), which bank should you use? You would choose Bank A because its EAR is higher. You would choose Bank B because its EAR is higher. You would choose Bank A because its nominal interest rate is higher. You would choose Bank B because its nominal interest rate is higher. You are indifferent between the banks and your...
Suppose you have savings of $6,697 in a bank account that paysmonthly compound interest of...
Suppose you have savings of $6,697 in a bank account that pays monthly compound interest of 1.4%. You expect towithdraw $338 per month for 9 months from your account, with the first withdrawal starting a month from now. If there are no other deposits or withdrawals, how much money will be left in your account right after your 9th withdrawal? Round your answer to the nearest $1, i.e., round to a whole number.
1. Simple Interest versus Compound Interest First Tappan Bank pays 9 percent simple interest on its...
1. Simple Interest versus Compound Interest First Tappan Bank pays 9 percent simple interest on its savings account balances, whereas First Mullineaux Bank pays 9 percent interest compounded annually. If you made a $7,500 deposit in each bank, how much more money would you earn from your First Mullineaux Bank account at the end of 8 years? 2. Calculating Future Values For each of the following, compute the future value: Present Value Years Interest Rate Future Value $2,328 11 13%...
If your bank account pays annual interest rate of 0.2% and compounds the interest every day,...
If your bank account pays annual interest rate of 0.2% and compounds the interest every day, how much is the future value of $500 saved in the account for 3 years? (include the equation) Hint: Assume there are 365 days per year.
1. If you deposit $12,000 in a bank account that pays 9% of interest annually, how...
1. If you deposit $12,000 in a bank account that pays 9% of interest annually, how much will be in your account after 5 years? Round your answer to the nearest cent. 2. What is the present value of a security that will pay $13,000 in 20 years if securities of equal risk pay 12% annually? Round your answer to the nearest cent. 3. Your parents will retire in 27 years. They currently have $400,000 saved, and they think they...
If you deposit $10,000 in a bank account that pays 5% interest annually, how much will...
If you deposit $10,000 in a bank account that pays 5% interest annually, how much will be in your account after 5 years? Do not round intermediate calculations. Round your answer to the nearest cent. What is the present value of a security that will pay $9,000 in 20 years if securities of equal risk pay 7% annually? Do not round intermediate calculations. Round your answer to the nearest cent. Your parents will retire in 28 years. They currently have...
If you deposit $10,000 in a bank account that pays 9% interest annually, how much will...
If you deposit $10,000 in a bank account that pays 9% interest annually, how much will be in your account after 5 years? Round your answer to the nearest cent.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT