Question: Python 3.6 I need the code ready to run Write a program that calculates the monthly payment of a car loan after the user gives

Python 3.6

I need the code ready to run

Write a program that calculates the monthly payment of a car loan after the user gives the amount of the loan, the interest rate, and the number of years as shown below:

Python 3.6 I need the code ready to run Write a program

Working formula:

Payment = Amount * I /(1 (1 + I)-months)

Where I = rate/1200

Sample Solution 1:

from tkinter import *

def calculate():

p = Get Loan Amount

r = Get Interest Rate

n = Get number of years

payment = Calculate payment

display payment

window = Tk()

window.title("Car Loan")

lblPrincipal = create Label as Amount of loan

lblPrincipal.grid for the amount

lblInterestRate = Label for Rate

lblInterestRate.grid for rate

lblNumberOfYears = Label for years

lblNumberOfYears.grid for years

lblMonthlyPayment = Label for monthly payment

lblMonthlyPayment.grid for payment

Declare string variables for amount, rate, etc.

Get all the values and use button to calculate the payment and display.

window.mainloop()

Rewrite solution of this problem using class (Object oriented style).

Car Loan Amount of loan: 16800 Interest rate (as %): 1.9 Number of years: Calculate Monthly Payment Monthly payment: $293.73

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!