Menu

Write Code Program Calculate Mortgage Payment Equation Calculating Mortgage Payment M P 1 Q43820124

Write a code program to calculate the mortgage payment. The equation for calculating the mortgage payment is: M = P (1+r)n (1

The program is in python 🙂

Write a code program to calculate the mortgage payment. The equation for calculating the mortgage payment is: M = P (1+r)n (1+r)n-1 Where: M is your monthly payment P is your principal r is your monthly interest rate, calculated by dividing your annual interest rate by 12. n is your number of payments (the number of months you will be paying the loan) Example: You have a $100,000 mortgage loan with 6 percent annual interest over 15 years. P= $100,000 r=0.06/12 = 0.005 (or 0.5%) n= 12 * 15 = 180 0.005(1 + 0.005)180 M = $100,000 (1 +0.005)180 – 1 M=$843.90 Your code shall include the prompts for entering the principal amount, total number of payments, and annual interest rate in percent. The output shall be the monthly payment. Exercise 7: Calculating the total interest paid for the mortgage This exercise asks you to add the total interest paid to the program you created in Exercise 6. The total interest paid for the mortgage can be calculate by subtracting the mortgage amount from the amount of total mortgage payment. Show transcribed image text Write a code program to calculate the mortgage payment. The equation for calculating the mortgage payment is: M = P (1+r)n (1+r)n-1 Where: M is your monthly payment P is your principal r is your monthly interest rate, calculated by dividing your annual interest rate by 12. n is your number of payments (the number of months you will be paying the loan) Example: You have a $100,000 mortgage loan with 6 percent annual interest over 15 years. P= $100,000 r=0.06/12 = 0.005 (or 0.5%) n= 12 * 15 = 180 0.005(1 + 0.005)180 M = $100,000 (1 +0.005)180 – 1 M=$843.90 Your code shall include the prompts for entering the principal amount, total number of payments, and annual interest rate in percent. The output shall be the monthly payment. Exercise 7: Calculating the total interest paid for the mortgage This exercise asks you to add the total interest paid to the program you created in Exercise 6. The total interest paid for the mortgage can be calculate by subtracting the mortgage amount from the amount of total mortgage payment.

Expert Answer


Answer to Write a code program to calculate the mortgage payment. The equation for calculating the mortgage payment is: M = P (1+r…

OR