Question: 1. Write a python function called calcMonthlyPmt that accepts THREE parameters (interest rate, loan amount and number of years) and should return the monthly payment.

1. Write a python function called calcMonthlyPmt that accepts THREE parameters (interest rate, loan amount and number of years) and should return the monthly payment.

Use this formula to calculate the monthly payment: ratePerMonth * loanAmount

1 (1 + ratePerMonth) numMonths

NOTE: there should be NO input or print statements in this function!

2. Write another function called calcTotalPmts. It should accept TWO parameters (monthlyPmt and number of months) and should return the total amount paid for the loan. NOTE: there should be NO input or print statements in this function!

3. In the main program, ask the user to enter these values at the beginning of the program.

Loan amount

Loan period (# of years)

Use a loop to display the results using a series of different interest rates.The loop should allow the interest rate to range from 5% up to and including 8%.Increment the interest rate by 1/8 each time through the loop. Each time through your loop, you should call your two functions to calculate the monthly and total payments, and print a line that displays these 3 values:

Interest Rate (formatted to display exactly 3 digits to the right of the decimal)

Monthly payment (formatted to display exactly 2 digits to the right of the decimal)

Total payment (formatted to display exactly 2 digits to the right of the decimal) Remember to include headings AND the underlining beneath the headings. Here is a sample run:

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!