In Part A, we unrealistically assumed that your salary didn't change. But you are clearly going...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
In Part A, we unrealistically assumed that your salary didn't change. But you are clearly going to be worth more to your company over time! So we are going to build on your solution to Part A by factoring in a raise every six months. In Problem 2 file, copy your solution to Part A (as we are going to reuse much of that machinery). Modify your program to include the following 1. Have the user input a semi-annual salary raise semi_annual_raise (as a decimal percentage); 2. After the 6th month, increase your salary by that percentage. Do the same after the 12th month, the 18th month, and so on. Write a program to calculate how many months it will take you save up enough money for a down payment. Like before, assume that your investments earn a return of r = 0.04 (or 4%) and the required down payment percentage is 0.25 (or 25%). Have the user enter the following variables: 1. The starting annual salary (annual salary) 2. The percentage of salary to be saved (portion_saved) 3. The cost of your dream home (total_cost) 4. The semi-annual salary raise (semi_annual_raise) percentage) 2. After the 6th month, increase your salary by that percentage. Do the same after the 12th month, the 18th month, and so on. Write a program to calculate how many months it will take you save up enough money for a down payment. Like before, assume that your investments earn a return of r = 0.04 (or 4%) and the required down payment percentage is 0.25 (or 25%). Have the user enter the following variables: 1. The starting annual salary (annual salary) 2. The percentage of salary to be saved (portion_saved) 3. The cost of your dream home (total_cost) 4. The semi-annual salary raise (semi_annual_raise) Hints To help you get started, here is a rough outline of the stages you should probably follow in writing your code: Retrieve user input. • Initialize some state variables. You should decide what information you need. Be sure to be careful about values that represent annual amounts and those that represent monthly amounts. Be careful about when you increase your salary-this should only happen after the 6th, 12th,18th month, and so on. Try different inputs and see how quickly or slowly you can save enough for a down payment. Please make your program print results in the format shown in the test cases below. Test Case 1 >>> Enter your starting annual salary: 120000 Enter the percent of your salary to save, as a decimal: . 05 Enter the cost of your dream home: 500000 Enter the semiannual raise, as a decimal: .03 Number of months: 142 >>> Test Case 2 >>> Enter your starting annual salary: 80000 Enter the percent of your salary to save, as a decimal: . 1 Enter the cost of your dream home: 800000 Enter the semiannual raise, as a decimal: .03 Number of months: 159 >>> Test Case 3 »» Enter your starting annual salary: 75000 Enter the percent of your salary to save, as a decimal: . 05 Enter the cost of your dream home: 1500000 Enter the semiannual raise, as a decimal: .05 Number of months: 261 >>> In Part A, we unrealistically assumed that your salary didn't change. But you are clearly going to be worth more to your company over time! So we are going to build on your solution to Part A by factoring in a raise every six months. In Problem 2 file, copy your solution to Part A (as we are going to reuse much of that machinery). Modify your program to include the following 1. Have the user input a semi-annual salary raise semi_annual_raise (as a decimal percentage); 2. After the 6th month, increase your salary by that percentage. Do the same after the 12th month, the 18th month, and so on. Write a program to calculate how many months it will take you save up enough money for a down payment. Like before, assume that your investments earn a return of r = 0.04 (or 4%) and the required down payment percentage is 0.25 (or 25%). Have the user enter the following variables: 1. The starting annual salary (annual salary) 2. The percentage of salary to be saved (portion_saved) 3. The cost of your dream home (total_cost) 4. The semi-annual salary raise (semi_annual_raise) percentage) 2. After the 6th month, increase your salary by that percentage. Do the same after the 12th month, the 18th month, and so on. Write a program to calculate how many months it will take you save up enough money for a down payment. Like before, assume that your investments earn a return of r = 0.04 (or 4%) and the required down payment percentage is 0.25 (or 25%). Have the user enter the following variables: 1. The starting annual salary (annual salary) 2. The percentage of salary to be saved (portion_saved) 3. The cost of your dream home (total_cost) 4. The semi-annual salary raise (semi_annual_raise) Hints To help you get started, here is a rough outline of the stages you should probably follow in writing your code: Retrieve user input. • Initialize some state variables. You should decide what information you need. Be sure to be careful about values that represent annual amounts and those that represent monthly amounts. Be careful about when you increase your salary-this should only happen after the 6th, 12th,18th month, and so on. Try different inputs and see how quickly or slowly you can save enough for a down payment. Please make your program print results in the format shown in the test cases below. Test Case 1 >>> Enter your starting annual salary: 120000 Enter the percent of your salary to save, as a decimal: . 05 Enter the cost of your dream home: 500000 Enter the semiannual raise, as a decimal: .03 Number of months: 142 >>> Test Case 2 >>> Enter your starting annual salary: 80000 Enter the percent of your salary to save, as a decimal: . 1 Enter the cost of your dream home: 800000 Enter the semiannual raise, as a decimal: .03 Number of months: 159 >>> Test Case 3 »» Enter your starting annual salary: 75000 Enter the percent of your salary to save, as a decimal: . 05 Enter the cost of your dream home: 1500000 Enter the semiannual raise, as a decimal: .05 Number of months: 261 >>>
Expert Answer:
Related Book For
Foundations of Financial Management
ISBN: 978-1259024979
10th Canadian edition
Authors: Stanley Block, Geoffrey Hirt, Bartley Danielsen, Doug Short, Michael Perretta
Posted Date:
Students also viewed these programming questions
-
In order to accumulate enough money for a down payment on a studio apartment, a freshman student deposits 200 usd per month in an account that pays 6% compounded monthly. a) How much will the student...
-
You plan to save money for a down payment of $43,000 to purchase an apartment. You can only afford to save $1,250 at the end of every quarter into an account that earns interest at 3.94% compounded...
-
a) How many years it will take you to double your money if you can earn 19% each year, given that compounding is quarterly? Do not write "years" in your answer. I If you can double your money in 7...
-
Seth borrows X for ten years at an annual effective interest rate of 4%, to be repaid with equal payments at the end of each year. The outstanding loan balance at the end of the eighth year is...
-
What is the conventional retail method?
-
Mega Inc.s manufacturing division lost $100,000 (net of tax) for the year ended December 31, 2023, and Mega estimates that it can sell the division at a loss of $200,000 (net of tax). The division...
-
As a kid, Haley Rosen played all the sports but quickly fell in love with soccer. She played soccer through her school years and was skilled at the game. When it was time for college, Stanford...
-
Convertible Bond Analysis Niendorf Incorporated needs to raise $2S million to construct production facilities for a new type of USB memory device. The firms straight nonconvertible debentures...
-
a) Explain the following principles of valuation i. Principle of conformity ii. Principle of substitution iii. Principle of highest and best use iv. Principle of supply and demand v. Principle of...
-
Simulation can be used to illustrate a number of results from statistics that are difficult to understand with non-simulation arguments. One is the famous central limit theorem, which says that if...
-
2. List the facts relevant to deciding whether this case is about law enforcement, some other need beyond law enforcement, or a combination.
-
why does depression appears to lower the activation of the sympathetic nervous system
-
Find the limit using factoring (dividing) technique 2x2-3x-2 lim =? 2+2 x-2
-
ethical leadership and ethical leaders. discovering your authentic leadership, difference between authentic leaders and authentic leadership
-
How is language lateralized in the brain? What role does handedness play? Explain
-
How can the principles and practices of indigenous restorative justice be integrated into the broader justice system to foster reconciliation, provide meaningful support to victims and offenders, and...
-
The stock of Oakmont Inc. had the following prices and dividends. What is the geometric average return on this stock? Year 2022 2021 2020 2019 Price (end of year) $45.20 $35.57 $26.00 $33.50 Dividend...
-
Explain the regulation of the secretions of the small intestine.
-
Larry's Athletic Lounge is considering an expansion program to increase the sophistication of the exercise equipment. The equipment will cost $20,000 and has an estimated life of five years. Larry is...
-
Why does the Toronto Stock Exchange have listing requirements? What are the major requirements? How do they compare with the listing requirements of the other exchanges?
-
Compare the use of leverage in a holding company to the concept of operating and financial leverage explained in Chapter 5. Does a holding company have any tax complications related to dividends?
-
Read the following extract from an article about a business venture of the Bob Jane company. Is prudence still a virtue? The concept of prudence and its use, or non-use, in financial reporting has...
-
Your friend Ninette Nobis was a tourism management student when you were at university together and is now a manager of an upmarket hotel in the Exquisite Hotels chain. Because of the impact of an...
-
Transactions affecting Bradford Ltds accounts receivable for the year ended 30 June are presented below. On 1 July of the previous year, the opening balance of the Allowance for Doubtful Debts...
Study smarter with the SolutionInn App