Question: Please solve this using a Spyder/Python code! (make sure it passes the case #1 & #2) 1. (a) Recall your question in Lab 01 assignment.

1. (a) Recall your question in Lab 01 assignment. Write a function house loano to calculate how many months it will take you to save up enough money for a down payment. Your function should take 4 parameters: total cost, annual salary, portion saved, and portion down payment. Parameter portion down payment should have a default value set as 0.25. (50 pts) (b) Write a script called lab_04_house_loan. py that includes the definition of housculoxeo that you just wrote. When the script is executed, it should ask the user to enter the following values and then use the house logo function to calculate the months needed to save enough money for a down payment. Note that all the arguments needs to be float numbers (50 pts) 1. The starting annual salary 2. The portion of salary to be saved 3. The cost of your dream home Here is an example of what my version looks like when you run it. Your version doesn't need to look identical, but it should look very similar, with all the outputs printed on the same line. Test Case 1 >>> Enter your annual salary: 120000 Enter the percent of your salary to save, as a decimal: .10 Enter the cost of your dream home: 1000000 Number of months: 183 >>> Test Case 1 >>> Enter your annual salary: 120000 Enter the percent of your salary to save, as a decimal: 10 Enter the cost of your dream home: 1000000 Number of months: 183 >>> Test Case 2 >>> Enter your annual salary: 80000 Enter the percent of your salary to save, as a decimal: 15 Enter the cost of your dream home: 500000 Number of months: 105
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
