Question

programming loop sample (Python) Problem 4.) Each month, Pytho puts $$100 into her bank account at...

programming loop sample (Python)

Problem 4.) Each month, Pytho puts $$100 into her bank account at the beginning of each month. Initially, she has $$100 in the account, marking her first deposit. At the end of each month, she earns 2% interest on her current balance, before the next deposit. Then, she makes her $$100 deposit. She would like a function that gives her balance after ?n months. Complete the function below so that the function returns the final balance. Keep in mind that ?=0t=0 corresponds to the initial month, when only one $$100 deposit has been made. Thus, she will have earned interest only on her initial $$100 deposit and she will have made one more deposit of $$100 at ?=1t=1 - that is, her balance should be $$202.

final_balance(360)

OUTPUT: 6357561.75

Homework Answers

Answer #1

#if there is any error, please tell in comments, and provide the function outline provided to you

def final_balance(n):
    rate = .02
    balance = 0
    for i in range(0,n):
        balance+=100
        balance+=balance*rate
    return balance

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
Jane is planning for her retirement. Each month she places $200 in an account that pays...
Jane is planning for her retirement. Each month she places $200 in an account that pays 12% nominal interest compounded monthly. She makes the first deposit of $200 on January 31, 1997. The last $200 deposit will be made on December 31, 2016. If the interest rate remains constant and all deposits are made as planned, what amount will be in Jane’s retirement account on January 1, 2017? Answer: $198,000. I know the correct answer but am struggling to get...
1. Tom opens an account with $500. He plans on saving $75 each month. The account...
1. Tom opens an account with $500. He plans on saving $75 each month. The account pays 2.3% compounded monthly. Create a table showing how much interest he will earn each month and his monthly balance for the first 5 months his account is open. Do this by hand with just the functions of a scientific calculator. Do not use the website. 2. Lydia saved $1,345,000 for retirement. The money is deposited in an account earning 3.2% compounded monthly. She...
Oscar’s Red Carpet Store maintains a checking account with Academy Bank. Oscar’s sells carpet each day...
Oscar’s Red Carpet Store maintains a checking account with Academy Bank. Oscar’s sells carpet each day but makes bank deposits only once per week. The following provides information from the company’s cash ledger for the month ending February 28, 2018. Date Amount No. Date Amount Deposits: 2/4 $ 2,600 Checks: 321 2/2 $ 4,600 2/11 2,200 322 2/8 650 2/18 3,100 323 2/12 2,400 2/25 4,000 324 2/19 2,100 Cash receipts: 2/26-2/28 1,500 325 2/27 450 326 2/28 950 $...
An examination of the cash activities during the year shows the following. GREAT ADVENTURES Cash Account...
An examination of the cash activities during the year shows the following. GREAT ADVENTURES Cash Account Records July 1, 2021, to December 31, 2021 Cash Receipts Cash Disbursements Date Desc. Amount Date Check# Desc. Amount 7/1 Stock sale $ 30,000 7/1 101 Insurance $ 5,400 7/15 Clinic receipts 1,800 7/2 102 Legal fees 1,750 7/22 Clinic receipts 2,760 7/7 DC Advertising 350 7/30 Clinic receipts 3,600 7/8 103 Bikes 12,500 8/1 Borrowing 35,000 7/24 DC Advertising 750 8/10 Clinic receipts...
What role could the governance of ethics have played if it had been in existence in...
What role could the governance of ethics have played if it had been in existence in the organization? Assess the leadership of Enron from an ethical perspective. THE FALL OF ENRON: A STAKEHOLDER FAILURE Once upon a time, there was a gleaming headquarters office tower in Houston, with a giant tilted "£"' in front, slowly revolving in the Texas sun. The Enron Corporation, which once ranked among the top Fortune 500 companies, collapsed in 2001 under a mountain of debt...
Discuss ethical issues that can be identified in this case and the mode of managing ethics...
Discuss ethical issues that can be identified in this case and the mode of managing ethics Enron finds itself in this case. How would you describe the ethical culture and levels of trust at Enron? Provide reasons for your assessment. THE FALL OF ENRON: A STAKEHOLDER FAILURE Once upon a time, there was a gleaming headquarters office tower in Houston, with a giant tilted "£"' in front, slowly revolving in the Texas sun. The Enron Corporation, which once ranked among...
Using the model proposed by Lafley and Charan, analyze how Apigee was able to drive innovation....
Using the model proposed by Lafley and Charan, analyze how Apigee was able to drive innovation. case:    W17400 APIGEE: PEOPLE MANAGEMENT PRACTICES AND THE CHALLENGE OF GROWTH Ranjeet Nambudiri, S. Ramnarayan, and Catherine Xavier wrote this case solely to provide material for class discussion. The authors do not intend to illustrate either effective or ineffective handling of a managerial situation. The authors may have disguised certain names and other identifying information to protect confidentiality. This publication may not be...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT