Question: Could you help me find 3 errors in this python code and fix them? Thank you! The formula for amortization is a= pi 1-(1+i) where

 Could you help me find 3 errors in this python code

Could you help me find 3 errors in this python code and fix them?

Thank you!

The formula for amortization is a= pi 1-(1+i)" where a is the monthly payment, p is the initial principal, i is the monthly interest rate, and n is the number of months. def amortize (principal, rate, years): **** "Return monthly payment for an amortized loan. Parameters: principal: initial principal balance rate: annual interest rate years: number of years over which payment is to be made Returns: monthly payment amount monthlyRate = rate / 12 months = years * 12 payment principal * monthlyRate / 1 - (1 + monthlyRate)**-months return payment rate= def main(): balance = float(input("How much are you borrowing? ")) float(input("What is the interest rate (e.g., 4 for 4%)? ") rate = rate / 100.0 years = float(input("What is the term of the loan, in years?")) monthly = round ( amortize(balance, rate, years), 2) print("Your monthly payment will be $" + monthly) main()

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!