Question

Using the below compound_by_period function, compute exactly how much money you would have if you started...

Using the below compound_by_period function, compute exactly how much money you would have if you started with a penny ($0.01) and doubled it every day for 30 days.


def compound_by_period(balance, rate, num_periods)
balances = [balance]
for n in range(1,num_periods+1):
balance = round( balance * (1 + rate), 2)
balances.append(balance)
return balances

wheat = compound_by_period(1,1,63)

total_wheat = sum(wheat)

Homework Answers

Answer #1

/********************main.py*********************/

def compound_by_period(balance, rate, num_periods):
balances = [balance]
for n in range(1,num_periods+1):
balance = round( balance * (1 + rate), 2)
balances.append(balance)
return balances

penny = compound_by_period(0.01,2,30)
totalPenny = sum(penny)
print("\nTotal wheat: ",totalPenny)

Please let me know if you have any doubt or modify the answer, Thanks :)

Know the answer?
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
Similar Questions
How much money would you have to invest today, at an interest rate of 5% in...
How much money would you have to invest today, at an interest rate of 5% in order to reach your goal of $1,000,000 in 30 years? Assume you don't put any additional money into this investment. $123,737.45 $321,377.45 $231,377.45 $132,733.45 How much money would you need to invest every year in order to reach your goal of $1,000,000 in 30 years at the same interest rate of 5%, if you had no money up-front TODAY to invest? (PV=0) $15,051.44 $231,377.45...
Using the formula, determine how much money you would have if you put 1,000 in the...
Using the formula, determine how much money you would have if you put 1,000 in the bank at an interest rate of 7% and kept it there for 5 years. Answer Using the formula, determine how much money you need to put into the bank to have $1,500 in 4 years if the interest rate is 5%. Answer Using the calculator answer the following questions. How much money would you have in the bank if you deposited $50 at an...
Assume you can earn 11% on the investments described below. How much money would each investment...
Assume you can earn 11% on the investments described below. How much money would each investment provide for you after six​ years? a. Invest ​$5000 as a lump sum today. b. Invest ​$1553 at the end of each of the next 6 years. c. Invest a lump sum of ​$2867 today and $983 at the end of each of the next 6 years. d. Invest ​$905 at the end of years​ 1, 3, and 5.
How much money do you think you would earn in a period of 30 days if...
How much money do you think you would earn in a period of 30 days if you were paid as follows: one cent for the first day, two cents for the second day, four cents for the third day, eight cents for the fourth day, and so on (i.e. your salary doubles each day)? Do you think you would make very little money, just a few dollars, at the end of the 30-day period? Let us write a program to...
How much money would you have in a year if you put $1,000 in the bank...
How much money would you have in a year if you put $1,000 in the bank at an annual interest rate of 3 percent? How much would you have if you left all of that money in the bank for another year and annual interest rates increased to 4 percent in the second year? How much would you loan your brother-in-law if he said he could repay you $100 in six months, $200 in a year, and $500 in two...
For the Time value of money, I want you to explore the "=RATE(...)" function in Excel....
For the Time value of money, I want you to explore the "=RATE(...)" function in Excel. It calculates the required interest rate your investment has to generate to match your annual contributions to the desired future value. For this exercise you will need to come up with three values (required inputs for RATE function): 1) Number of years until retirement (NPER); 2) How much you are willing to contribute every year (PMT), and the desired amount of money you wish...
You are trying to decide how much to save for retirement. Assume you plan to save...
You are trying to decide how much to save for retirement. Assume you plan to save $4,000 per year with the first investment made one year from now. You think you can earn 8.0​% per year on your investments and you plan to retire in 34 ​years, immediately after making your last $4,000 investment. a. How much will you have in your retirement account on the day you​ retire? b. ​ If, instead of investing $4,000 per​ year, you wanted...
1) How much money will you accumulate by the end of 30 years if you invest...
1) How much money will you accumulate by the end of 30 years if you invest $200 per month and you start out with $30 000 in the bank? Assume the interest rate your money earns is 8% per year and you start saving next month. a) $55 505 b) $30 000 c) $628 131 d) $626 144 2) How much is the monthly payment on a $250 000 loan for 15 years at 10% interest per year? Assume first...
You are trying to decide how much to save for retirement. Assume you plan to save...
You are trying to decide how much to save for retirement. Assume you plan to save $ 5 comma 000$5,000 per year with the first investment made one year from now. You think you can earn 7.07.0​% per year on your investments and you plan to retire in   2727 ​years, immediately after making your last $ 5 comma 000$5,000 investment. a. How much will you have in your retirement account on the day you​ retire? b.​ If, instead of investing...
You are trying to decide how much to save for retirement. Assume you plan to save...
You are trying to decide how much to save for retirement. Assume you plan to save $6,000 per year with the first investment made one year from now. You think you can earn 11.0​% per year on your investments and you plan to retire in 28 ​years, immediately after making your last $6,000 investment. a. How much will you have in your retirement account on the day you​ retire? b.​ If, instead of investing $6,000 per​ year, you wanted to...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT