Question: In Python, Write a program to compare how many years it will take to pay off a $250,000 mortgage, depending on the interest rate and
In Python, Write a program to compare how many years it will take to pay off a $250,000 mortgage, depending on the interest rate and payment amount.
Use simple annual interest and the following interest and payment amounts:
- 15-year loan: annual interest rate=2.5% (0.25) and a payment of $1750
- 30-year loan: annual interest rate=3.5% (0.30) and a payment of $1250
In other words, for each year the amount of interest due (i) for each payment is the same: (remaining principal * interest rate) / 12. The amount of principal (p) covered by each monthly payment is also the same for that year (fixed payment amount - interest payment amount). The principal is reduced each month by the amount of principal paid. You can calculate (p) and (i) at the beginning of each year and then calculate the remaining principal after each month. Calculate the total interest paid for all months and then compare the results for the two repayment plans. Which is better?
The output should show the remaining principal and monthly interest due at the beginning of each year. For debugging purposes, the remaining principal should be shown after each monthly payment is made. But, add a user prompt (for a y or n entry) so the user can decide whether to display the monthly output lines. Finally, calculate which repayment plan is better (less interest paid over the course of the loan) and how much is saved for that plan.
Must be written using Python
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
