1. Engineering
  2. Computer Science
  3. in python code please...

Question: in python code please...

Question details

Task 4: Student Loan Calculator Again Next youre 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 youll end up paying, and the total amount of interest youll 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. Heres 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.

in python code please

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution