Question: program that prompts the user to enter a loan amount, interest rate, and number of years for a car loan. Then it prints the monthly

program that prompts the user to enter a loan amount, interest rate, and number of years for a car loan. Then it prints the monthly payment amount and the loan history.

I have the code

loan_amount = float(input('Loan Amount: '))interest_rate = float(input('Annual Interest Rate: '))years = int(input('Years: '))#calculate loan termloan_term = int(12*years)#formula givenR = 1 + (interest_rate)/(12*100)payment = loan_amount*(R**loan_term)*(1-R)/(1-R**loan_term)print('Your monthly payment is: ${:.2f}'.format(payment))monthly_interest = []monhtly_balance = []for i in range(1,loan_term + 1): #calculate interest and loan amount for each month interest = loan_amount*(R-1) loan_amount = loan_amount - (payment - interest) monthly_interest.append(interest) monhtly_balance.append(loan_amount)

I need help with creating the loan history

Sample Output Below

 program that prompts the user to enter a loan amount, interest

\f

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 Programming Questions!