Question: For a term loan with initial principal ( total loan amount ) value of P , the monthly payment A can be computed with the

For a term loan with initial principal (total loan amount) value of P, the monthly payment A can be computed with the formula:
A=iP(1+i)n(1+i)n-1
Where i is the monthly interest rate (decimal value), computed from an annual rate (decimal value not percent)r as i=r12, and n is the number of months in the term of the loan. The total interest paid T over the full term of the loan is then
T=An-P
Write a script to determine the total interest paid over the full term of a loan for the following two cases:
Annual interest percentage rate of r=4.25% and a 20 year term. Assign the calculated monthly payment to the variable Payment 2 eyear. Assign the total interest paid to a variable named Interest2year.
Annual interest percentage rate of r=4.875% and a 30 year term. Assign the calculated monthly payment to the variable Payment 3eyear. Assign the total interest paid to a variable named Interest30year.
Code has already been provided to assign the value of the loan principal and assign it to the variable LoanPrincipal. Do not assign a new value to LoanPrincipal in your script.
 For a term loan with initial principal (total loan amount) value

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!