Question

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 :)

0 0
Add a comment Improve this question Transcribed image text
Answer #1

If you have any doubts, please give me comment...

P = float(input("Enter principal amount: "))

n = int(input("Enter total number of payments: "))

r = float(input("Enter annual interest rate in percent: "))

r = (r/100)/12

n = 12 * n

M = P*((r*((1+r)**n))/(((1+r)**n)-1))

print("M = %.2f"%M)

# Exercise 7

total_mortage_payment = M * n

total_interest_paid = total_mortage_payment - P

print("\nTotal interest paid: %.2f"%total_interest_paid)

nagarajuanagaraju-Vostro-3550:10012020$ python3 mortage.py Enter principal amount: 100000 Enter total number of payments: 15

Add a comment
Know the answer?
Add Answer to:
The program is in python :) Write a code program to calculate the mortgage payment. The...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • using Matlab program: Create a loan payment program that can be used for any loan amount...

    using Matlab program: Create a loan payment program that can be used for any loan amount such as a home or car loan. The program should ask the user for the input values below, compute the monthly payment, then compute the monthly balance. Display the balance in a table Month             Balance 1                      $ ##.## 2                      $ ##.## 3                      $ ##.##       . . . etc Use the formula PMT=P*(r(1+r)^n)/((1+r)^n-1) PMT = the monthly payment. P = the principal r = the interest rate per month, which...

  • Question 4 (1 point) Mortgage Payment Formula As payments are made to pay off a mortgage,...

    Question 4 (1 point) Mortgage Payment Formula As payments are made to pay off a mortgage, the principal balance remaining to be paid goes down a little after each payment in a non-linear fashion. The principal balance after k months (k payments) is: P = -m ((r + 1)* - 1 - + (r + 1)*P Where: m is the monthly payment (same amount each month). r is the monthly interest rate as a decimal number, e.g., 0.5%/month = P,...

  • Instructions Find the MONTHLY mortgage PAYMENT of stress tested(+2%) on your rate of 3.18% with a...

    Instructions Find the MONTHLY mortgage PAYMENT of stress tested(+2%) on your rate of 3.18% with a 20 year amortization mortgage. You will use the mortgage amount from previous sections. You must also determine the amount of INTEREST, PRINCIPAL and BALANCE owing for the mortgage after 3 Years and 1 Months. Input all the TVM variables and answers into the fields below. Mortgage Amount From Previous Question - Amortization $464372.71 20 Years - P/Y r Present Value of Loan (PV, FP1...

  • Section 5 - Mortgage Calculation Instructions Find the MONTHLY mortgage PAYMENT of stress tested(+2%) on your...

    Section 5 - Mortgage Calculation Instructions Find the MONTHLY mortgage PAYMENT of stress tested(+2%) on your rate of 3.21% with a 25 year amortization mortgage. You will use the mortgage amount from previous sections. You must also determine the amount of INTEREST, PRINCIPAL and BALANCE owing for the mortgage after 3 Years and 7 Months. Input all the TVM variables and answers into the fields below. - Amortization Mortgage Amount From Previous Question $378102 25 Years Present Value of Loan...

  • Program Specification: This project involves implementing a Java program that performs a calculation of payments associated...

    Program Specification: This project involves implementing a Java program that performs a calculation of payments associated with loans. The program shall allow a user to enter the following data: annual interest rate the loan (i.e. , number of years), and the loan amount. A GUI like the one below must be used. Loan Calculator Annual Interest Rate: Number of Years Loan Amount: Monthly Payment Total Payment Calculate When the user presses the calculate button, the monthly payment and total amount...

  • MATLAB!!! CAN SOMEONE SOLVE THIS PROBLEM ON MATLAB?? THANK YOU PART B: HOUSING LOAN CALCULATOR In this part of the assignment, you are expected to develop a program that calculates housing loan pay-...

    MATLAB!!! CAN SOMEONE SOLVE THIS PROBLEM ON MATLAB?? THANK YOU PART B: HOUSING LOAN CALCULATOR In this part of the assignment, you are expected to develop a program that calculates housing loan pay- ments based on compound interest formulas The program should prompt a user to input the amount borrowed (principal), p, the number of monthly payments, n, and an annual interest rate in R percent. The program should convert the annual interest rate R into a monthly interest rate...

  • Create a program that calculate the amount of a mortgage payment. Refer to the appropriate video...

    Create a program that calculate the amount of a mortgage payment. Refer to the appropriate video or any online source for how the mathematics of the calculation works. If given these three things: The amount of the loan in whole dollars The number of payments (e.g. 360 for 30-year) The interest rate per payment period in percent ( a positive floating-point number) The program should print out the correct value (in dollars and cents) of the per-period payment of principal...

  • My library>CptS 111 home> 2.9: zyLab PA #1: Student Loan R oks zyBooks cat @Help/FAQ θ...

    My library>CptS 111 home> 2.9: zyLab PA #1: Student Loan R oks zyBooks cat @Help/FAQ θ Mohammed Al Shukaili 2.9 zyLabPA#1:Student Loan RepaymentCalculator For this assignment you wil write a program to calculate the monthly payments required to pay back a student loan You vill need to prompt the user for the following values Annual interest rate (as a percentage) Number of years to repay loan . and display the output in a readable form. Output should include Amount of...

  • Mortgage Analysis Part I You are planning to purchase a house that costs $480,000. You plan...

    Mortgage Analysis Part I You are planning to purchase a house that costs $480,000. You plan to put 20% down and borrow the remainder. Based on your credit score, you believe that you will pay 3.99% on a 30-year mortgage. Use the function “PMT” to calculate your mortgage payment. Calculate the total cost of the home purchase. (Down payment plus principal (loan amount) plus interest.) Calculate how much interest you will pay in total? Assume that you plan to pay...

  • %%Python Question%% get_min_payment() • Parameters ◦ the total amount of the mortgage (called the principal; should...

    %%Python Question%% get_min_payment() • Parameters ◦ the total amount of the mortgage (called the principal; should be a positive number) ◦ the annual interest rate (should be a float between 0 and 1) ◦ the term of the mortgage, in years (should be a positive integer; default value: 30) ◦ the number of payments per year (should be a positive integer; default value: 12) • Functionality ◦ Compute the minimum mortgage payment. Should use the formula A= Pr(1+r) n (1+r)...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT