To model repayment of a loan, you need to calculate the intereston the balance and deduct any payments made. So if the balance atthe start of the period is L the balance at the end of the periodbefore the payment is L(1+r) where r is the interest rate perperiod (e.g. if the payments are monthly, it is a monthly interestrate) and the balance after the payment is L(1+r)−P where P is thepayment per period (e.g. monthly payment). That is the startingbalance for the next period which uses the same formula for thenext payment. Create a Python program that will allow a user tocalculate the amount of a loan after a specified number of monthlypayments. Specifically, the program should:
- Prompt the user for the initial value of the loan and store thevariable as “L_valueâ€
- Prompt the user for the interest rate per month and store thevalue as “i_rateâ€
- Prompt the user for the number of months to calculate and storethe value as “n_moâ€
- Prompt the user for the monthly payment and store as a variable“m_payâ€
- Calculate the total current value of the loan for a month andstore is as “cl_valâ€
- Repeat the calculation for each month specified (n_mo) OR untilthe loan is paid off (cl_val is less than or equal to 0)
- You do NOT have to calculate the final payment amount to get toexactly 0
- Print the month number and the total loan amount for each monthcalculated