Question: 3. Write a Python program to solve the following problems: 1. John decides to take out a multi-year fixed-rate mortgage of $30,000 to purchase a

3. Write a Python program to solve the following problems:

1. John decides to take out a multi-year fixed-rate mortgage of $30,000 to purchase a new car. The interest rate is 3.5% and the monthly payment is $545.75. Write a function, `total`, to calculate the total amount that he will have to pay over the life of the mortgage. You can ignore the overpayment that occurs in the last month. To calculate each month's remaining principal: remaining principal of this month = remaining principal of last month * (1 + rate/12) - monthly payment. (You should get an answer of \$33290.75.)

2. What will be the total amount if John pays an extra \$200/month for the first 12 months of the mortgage? Create a new function, `total_with_extra_payment`, to incorporate this extra payment and print the total amount paid and the number of months. (You should get a total payment of \$32416.25 over 55 months.)

3. Create a new function, `total_with_extra_payment_2` (based on previous function), by adding arguments of extra payment information. Create For example, the extra month payment of \$500.00 could start from the 13th month and end at the 24th month. (Hint: the remaining principal of this month = remaining principal of last month * (1 + rate/12) - monthly payment.)

4. Create a new function, `total_with_extra_payment_3` (based on previous function), so it prints the month number, total paid amount so far, and the remaining principal in a nice format. The output should look like this:

```

1, $ 745.75, $29341.75

2, $ 1491.50, $28681.58

3, $ 2237.25, $28019.48

4, $ 2983.00, $27355.46

5, $ 3728.75, $26689.49

...

52, $30779.00, $ 1569.19

53, $31324.75, $ 1028.02

54, $31870.50, $ 485.26

55, $32416.25, $ -59.07

```

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!