Question: in python code please Task 4: Student Loan Calculator Again Next you're going to modify your Student Loan Repayment Calculator program to use functions As

 in python code please Task 4: Student Loan Calculator Again Next

in python code please

Task 4: Student Loan Calculator Again Next you're going to modify your Student Loan Repayment Calculator program to use functions As a reminder, the equation for a monthly payment is given by: P(i/12) 1- (1 i/12)-n where p is the monthly payment, P is the loan amount, is the annual percent interest rate (must be a fraction in the program), and n is the number of monthly payments. Write a program to calculate the monthly amount you owe, the total amount you'll end up paying, and the total amount of interest you'll have paid. The program must include the following . Global variables for the interest rate (a float), number of monthly payments (an integer), and amount of loan principal (P, a float) . A function calc.monthly-pymt () that calculates your monthly payment To print the dollar amounts, use string formatting rather than truncating the amounts as integers For example, ! >>> iou 25 * 22 >> iou 3 78.57142857142857 4 >>> print(, I owe you $%0.2f., % iou) s I owe you $78.57. Here's an example of my output i Enter the amount you owe [no commas]30000 2 Enter the interest rate [%]: 6.8 3 Enter the number of years you want to spend to pay back your loan: 10 s Your monthly payment is $345.24 6 The total amount you ended up paying is $41428.92 7 The total amount of interest you paid is $11428.92

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!