Question

suppose you have an investment plan where you invest a certain fixed amount every year. Modify...

suppose you have an investment plan where you invest a certain fixed amount every year. Modify futval. py to compute the total accumulation of your investment. the input to the program will be the amount to invest each year, the interest rate, and the number of years for the investment.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

the following python code gives you the required functionality

# your code goes here
amt = float(input('Enter your amount: '))
rate = float(input('Enter interest rate in percentage: '))
yr = int(input('Enter no. of years: '))
sum = 0.0
for i in range(0,yr):
   sum = sum + amt
   sum = sum + (sum*rate)/100
print('Sum after ' + str(yr) + ' years is: ' + str(sum))

Input:

3000
1
3

Output:

Sum after 3 years is: 9181.203

Link of the code:

http://ideone.com/0j2GR5

Hope it helps, do give your response

Add a comment
Know the answer?
Add Answer to:
suppose you have an investment plan where you invest a certain fixed amount every year. Modify...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Retirement Plan Now that you have a house, it’s time for you to plan for retirement....

    Retirement Plan Now that you have a house, it’s time for you to plan for retirement. Your plan is to take a certain amount from your salary at the end of each year and invest it in a 401(K) mutual fund. Then when you get sick of your job and want to retire, you will have a fund that you can withdraw from each year to live on. Let’s assume you want to retire at age 60 and your life...

  • You have just retired and you have ¥1,000,000 in your account. You plan to spend it...

    You have just retired and you have ¥1,000,000 in your account. You plan to spend it over 30 years by withdrawing a fixed real amount every year, with the first withdrawal immediate. Suppose the interest rate is 6%. How much can you withdraw every year?

  • Write a program in Python that computes the interest accrued on an account. You can modify...

    Write a program in Python that computes the interest accrued on an account. You can modify the “futval.py” program given in Chapter 2 to accomplish it. Your program should use a counted loop rather than a formula. It should prompt the user to enter the principal amount, the yearly interest rate as a decimal number, the number of compounding periods in a year, and the duration. It should display the principal value at the end of the duration. To compute...

  • You plan to invest an amount of money in five-year certificate of deposit (CD) at your...

    You plan to invest an amount of money in five-year certificate of deposit (CD) at your bank. The stated interest rate applied to the CD is 12 percent, compounded monthly. How much must you invest if you want the balance in the CD account to be $8,500 in five years? Please explain the formula.

  • Write a program that calculates the amount of money that you must invest In a savings...

    Write a program that calculates the amount of money that you must invest In a savings account at a given interest rate for a given number of years to have a certain dollar amount at me end of the period Y our program will ask the user for the amount the user wants to have at the end of the term (future value). the number of years the user plans to let the money stay in the account, and the...

  • Question 9: (2 points) Suppose you have $600 to invest in a savings plan, and you...

    Question 9: (2 points) Suppose you have $600 to invest in a savings plan, and you want to compare 4 could invest the money. Find the balance after one year if you deposit all the money into an account that interest each month (this is a simple interest equation where the amount of inte each month). Round answers to the nearest cent Find the balance after one year if you deposit all the money into an account that monthly compounding...

  • Exercise 2: Suppose you invest $2,500 in a bank at the rate of 14 percent per...

    Exercise 2: Suppose you invest $2,500 in a bank at the rate of 14 percent per year. What will be the future value of your investment in six years? Exercise 3: Suppose you're 22 years old now, in order to have $1,000,000 when you're retired (60 ye old), how much that you need to save money from now? (Assuming that interest rate is fixed at 12% year) Exercise 2: Suppose you invest $2,500 in a bank at the rate of...

  • 1. Time Value of Money You have been offered a unique investment opportunity. If you invest...

    1. Time Value of Money You have been offered a unique investment opportunity. If you invest $20,000 today, you will receive $1000 one year from now, $3000 two years from now, and $20,000 ten years from now. a. What is the NPV of the investment opportunity if the interest rate is 12% per year? Should you take the opportunity? b. What is the NPV of the investment opportunity if the interest rate is 2% per year? Should you take the...

  • A group of new college graduates want to know if they save a certain amount of...

    A group of new college graduates want to know if they save a certain amount of money every month for a certain amount of years, how much saving they are going to get after certain amount of time. Write a python program to help them out. Ask the user to input how much they plan to save per month; how many years (integer) they are going to keep on saving the money; every how many years do they expect to...

  • 1. What is the amount you would need to invest today or order to have $30,000...

    1. What is the amount you would need to invest today or order to have $30,000 in 20 years and your investment has a 5% rate of return that is compounded annually? Round your answer to the nearest cent. 2. How much would you need to invest today in order to receive a monthly payment of $500 for 3 years. At the end of the three years there will be nothing left in the investment. This investment will yield 12%....

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT