Question

In: Computer Science

Suppose you have a certain amount of money in a savings account that earns compound monthly...

Suppose you have a certain amount of money in a savings account that earns compound monthly interest, and you want to calculate the amount that you will have after a specific number of months. The formula is as follows:

f = p * (1 + i)^t

• f is the future value of the account after the specified time period.
• p is the present value of the account.
• i is the monthly interest rate.
• t is the number of months.

Write a program that takes the account's present value, monthly interest rate, and the number of months that the money will be left in the account as three inputs from the user. The program should pass these values to a function thatreturns the future value of the account, after the specified number of months. The program should print the account's future value.

Sample Run

Enter current bank balance:35.7↵
Enter interest rate:0↵
Enter the amount of time that passes:100↵ 35.7↵

Solutions

Expert Solution

def future_value(present_value,interest_rate,months):
    return present_value*(1+interest_rate)**months

present_value=int(input('Enter current bank balance: $'))
interest=float(input('Enter interest rate: '))/100
num_months=int(input('Enter the amount of time that passes: '))
future_total=future_value(present_value,interest,num_months)
print('\nYour account will hold ${:.2f}'.format(future_total), 'after' ,num_months, 'months.')

OUTPUT:-

Enter current bank balance: $1000
Enter interest rate: 5
Enter the amount of time that passes: 10

Your account will hold $1628.89 after 10 months.


Related Solutions

You have invested money in a savings account that pays a fixed monthly interest on the...
You have invested money in a savings account that pays a fixed monthly interest on the account balance. The following table shows the account balance over the first 5 months. Time in months Savings balance 0 $1500.00 1 $1521.00 2 $1542.29 3 $1563.88 4 $1585.77 5 $1607.97 (a) How much money was originally invested? $   (b) Show that the data are exponential. (Round your answer to three decimal places.) Each successive ratio of new/old is   , which shows that the data...
Suppose you have $10,000 in a savings account that earns 4% interest. Further, suppose you were...
Suppose you have $10,000 in a savings account that earns 4% interest. Further, suppose you were to take all $10,000 out and start a business. After a year you sell the business for $15,000 a- What is the accounting profit you made on the sale of this business? b-What is the economic profit you made on the sale of this business?
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.
Suppose you open today (year 0) a savings account with $5,000; the account earns an interest...
Suppose you open today (year 0) a savings account with $5,000; the account earns an interest of 3% APR annually. At the end of year 2 you deposit an additional $5,000 in the savings account, and then at the end of year 7 you deposit another $5,000 in the account. There is a total of 3 deposits made so far. If you did not make any withdrawals or additional deposits, then approximately what is the balance (FV) in the account...
The formula for calculating the amount of money in a savings account that begins with an...
The formula for calculating the amount of money in a savings account that begins with an initial principal value (P) and earns annual interest (i) for (n) years is: P(1 + i)n Note that i is a decimal, not a percent interest rate: .1 NOT 10%              Write a python program that does the following: Prompt the user on three lines for principal, percent interest rate and number of years to invest (using descriptive prompts) Use a while loop to...
An amount of P 250,000 is now deposited into a savings account that earns 12% compounded...
An amount of P 250,000 is now deposited into a savings account that earns 12% compounded continuously for the school requirements of a civil engineering student on the succeeding 5 years from now. If the every year the student will withdraw P 51,651 from this account, how many years would the deposit lasts?
You have just received an endowment and placed this money in a savings account at an...
You have just received an endowment and placed this money in a savings account at an annual rate of 13.58 percent. You are going to withdraw the following cash flows for the next five years. End of year 1.   $7,512 2.   $8,140 3.   $4,455 4.   $3,122 5.   $1,857 How much is the endowment that you received? Round the answer to two decimal places.
Determine the amount of money in a savings account at the end of 8 years, given...
Determine the amount of money in a savings account at the end of 8 years, given an initial deposit of $40,000 and a 4 percent annual interest rate when interest is compounded: 1. Annually    2. Semiannually    3. Quarterly ​
22. Determine the amount of money in a savings account at the end of 3 years,...
22. Determine the amount of money in a savings account at the end of 3 years, given an initial deposit of $4,000 and an annual interest rate of 4 percent when interest is compounded: Use Appendix A for an approximate answer, but calculate your final answer using the formula and financial calculator methods. (Do not round intermediate calculations. Round your final answers to 2 decimal places.) Future value a. Annually b. Semiannually c. Quarterly 30. Your parents have accumulated a...
on a certain amount of money, the difference between the compound interest of a year payable...
on a certain amount of money, the difference between the compound interest of a year payable 4 times per year and the simple interest for a year is AED150. IF THE RATE OF INTEREST IN BOTH CASES IS 5% what is the value of this amount
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT