Question

1 Problem You have graduated and have a great job! You move to Ottawa and decide...

1 Problem

You have graduated and have a great job! You move to Ottawa and decide that you want to start saving to buy a house. As housing prices are very high in the Ottawa, you realize you are going to have to save for several years before you can afford to make the down payment on a house.You are going to determine how long it will take you to save enough money to make the down payment given the following assumptions:

  • Call the cost of your dream home total cost.

  • Call the portion of the cost needed for a down payment portion down payment.

    For simplicity, assume that portion down payment = 0.25 (25%).

  • Call the amount that you have saved thus far current savings. You start with a

    current savings of $0.

  • Assume that you invest your current savings wisely, with an annual return of r (in other words, at the end of each month, you receive an additional current savings*r/12 funds to add into your savings. The division by 12 is because r is an annual rate). Assume that your investments earn a return of r = 0.04 (4%).

  • Assume your annual salary is annual salary.

  • Assume you are going to dedicate a certain amount of your salary each month to saving for the down payment. Call that portion saved. This variable should be in decimal form (i.e. 0.1 for 10%).

  • At the end of each month, your savings will be increased by the return on your in- vestment, plus a percentage of your monthly salary (annual salary / 12). Write a program to calculate how many months it will take you to save up enough money for a down payment. You will want your main variables to be floats, so you should cast user inputs to floats.

    Your program should ask the user to enter the values for following variables:

    • The starting annual salary (annual salary)
    • The portion of salary to be saved (portion saved) • The cost of your dream home (total cost)

    Try different inputs for annual salary,portion saved,and total cost see how long it takes to save for a down payment for the cost of the house you have entered.Test your program by printing portion saved and no of months for the variable values that you have entered.

0 0
Add a comment Improve this question Transcribed image text
Answer #1
Thanks for the question. Below is the code you will be needing. Let me know if you have any doubts or if you need anything to change. 

Thank You !

===========================================================================

def main():
    annual_salary = float(input('Enter annual salary: '))
    portion_saved = float(input('Enter the portion of your salary you like to save every month: '))
    total_cost = float(input('Enter home total cost: '))

    current_savings = 0
    monthly_savings = (annual_salary / 12) * portion_saved
    r = 0.04
    down_payment = 0.25

    months_needed = 0
    while current_savings < total_cost * down_payment:
        current_savings += monthly_savings + current_savings * r
        months_needed += 1

    print('It will take {} months to save enough money for the down payment'.format(months_needed))


main()

==================================================================

Add a comment
Know the answer?
Add Answer to:
1 Problem You have graduated and have a great job! You move to Ottawa and decide...
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
  • You just graduated from college and decide to start saving for a down payment to buy...

    You just graduated from college and decide to start saving for a down payment to buy a house 5 years from today. You estimate you will need $20,000 in 5 years for the down payment. (Note: a down payment is a deposit a home buyer must make in order to get a mortgage loan from a bank to buy the house.) 3a. Assume you can earn 6% interest (APR) on your savings, and you make a deposit in your savings...

  • You just graduated from college and decide to start saving for a down payment to buy a house 5 years from today. You est...

    You just graduated from college and decide to start saving for a down payment to buy a house 5 years from today. You estimate you will need $20,000 in 5 years for the down payment. (Note: a down payment is a deposit a home buyer must make in order to get a mortgage loan from a bank to buy the house.) 1. Assume you can earn 6% interest (APR) on your savings, and you want to make a single deposit...

  • You want to buy a house within 3 years, and you are currently saving for the...

    You want to buy a house within 3 years, and you are currently saving for the down payment. You plan to save $8,000 at the end of the first year, and you anticipate that your annual savings will increase by 20% annually thereafter. Your expected annual return is 7%. How much will you have for a down payment at the end of Year 3? Do not round intermediate calculations. Round your answer to the nearest cent.

  • You want to buy a house within 3 years, and you are currently saving for the...

    You want to buy a house within 3 years, and you are currently saving for the down payment. You plan to save $9,000 at the end of the first year, and you anticipate that your annual savings will increase by 10% annually thereafter. Your expected annual return is 11%. How much will you have for a down payment at the end of Year 3? Do not round intermediate calculations. Round your answer to the nearest cent.

  • Please try not to answer if you are not going to answer both so that I can give my rating to some...

    Please try not to answer if you are not going to answer both so that I can give my rating to someone else! Thank you!!! Suppose you take a 15-year mortgage for a house that costs $296912. Assume the following: The annual interest rate on the mortgage is 4.5%. . The bank requires a minimum down payment of 8% of the cost of the house. . The annual property tax is 1.1% of the cost of the house. The annual...

  • Today is July 1, 2024. Four years ago, when you started your first job after gradusting...

    Today is July 1, 2024. Four years ago, when you started your first job after gradusting from ohio state in 2020, you began saving s portion of your salary in your company's 401 savings plan. Your salary is $60,000 annually, of which you decide to put 10% in the use annual deposits for simplicity.) Assume the savings plan earns 9% interest annually savings plan at the end of each year. (in reality, a portion is saved from each paycheck, but...

  • Show how to enter into EXCEL 1. You have decided to place $153 in equal deposits...

    Show how to enter into EXCEL 1. You have decided to place $153 in equal deposits every month at the beginning of the month into a savings account earning 4.69 percent per year, compounded monthly for the next 15 years. The first deposit is made today. How much money will be in the account at the end of that time period? Round the answer to two decimal places 2. What is the present value of the following annuity? $4,765 every...

  • QUESTION 5 You would like to plan for your retirement. You have gathered or assumed the...

    QUESTION 5 You would like to plan for your retirement. You have gathered or assumed the following information:  You just turned 30 years of age, and currently have zero savings.  You plan to work until you turn 50 years old, at which time you would like to retire. During retirement, assume that you will have no sources of income other than what you can earn on the money that you have saved up for retirement.  For the...

  • 1) (3 pts) Bob would like to have a total savings of $30,000 in 6 years...

    1) (3 pts) Bob would like to have a total savings of $30,000 in 6 years to use as a down payment on a future house purchase. He has no money saved up now, but plans on depositing $350 per month at the end of every month to save for this goal. What is the periodic interest rate Bolb must earn to reach his goal? What is the Annual Percentage rate? FVr I Periodic #

  • You are a very forward looking college student with 2 years to go before graduation. You...

    You are a very forward looking college student with 2 years to go before graduation. You would like to be able to purchase your first home 4 years after graduation (6 years from now) and will need $50,000 for the down payment. You have been a good saver and currently have $15,000 in your savings account (this is from before college and you will not be able to save any more until after graduation). Assume that your salary the first...

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
ADVERTISEMENT