Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Introduction Loans are commonly used to finance purchases, but we're often only concerned with the monthly payment for a loan and may not realize how

Introduction

Loans are commonly used to finance purchases, but we're often only concerned with the monthly payment for a loan and may not realize how much we're spending on interest over the life of the loan. For this individual assignment, use a python program calledia05.pythat uses Tkinter for a user interface to compute a monthly payment for a loan, show the loan amortization, and show the total interest paid over the life of a loan.

Compute a loan payment

needs to have a window using Tkinter with these text fields:

FieldDescriptionInput/OutputyearsNumber of yearsInputamountAmount loanedInputrateInterest rate per yearInputpaymentComputed monthly paymentOutput (read-only)total_interestComputed total interest paidOutput (read-only)

needs a scrollable listbox to show the loan amortization for each month of payments on the loan.

needs to have the three buttons:

  • Compute
  • Clear
  • Exit

Here is an example of how the window could look:

Button functions:

  • When the user clicks "Clear", set the years_text, amount_text, rate_text, payment_text, andtotal_interest_text input StringVars to empty strings, and delete all rows from the loan amortization listbox.
  • When the user clicks "Exit", destroy the main window to exit the program.
  • When the user clicks "Compute":
  • Compute the monthly loan payment using this formula (you'll need toget()the rate, years, and amount from the window'sStringVartext variables to use in this formula):
monthlyrate = float(rate) / 12.0 months = int(years) * 12 payment = float(amount) * ((monthlyrate * (1 + monthlyrate) ** months) / ((1 + monthlyrate) ** months - 1)) balance = float(amount) total_interest = 0 
  • Set thepaymentandtotal_interestGUI text fields to the values computed
  • Loop over the number of months and compute the interest, payment, and balance for the month:
  • interest = the balance times monthlyrate
  • principal = the payment minus interest
  • balance = balance minus principal
  • total_interest += interest
  • Add a line to the listbox showing the month number, payment, principal, interest, and balance

QUESTION: How to get the output tkinter in python? (need still basic python) THANK!!

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Financial management theory and practice

Authors: Eugene F. Brigham and Michael C. Ehrhardt

12th Edition

978-0030243998, 30243998, 324422695, 978-0324422696

Students also viewed these Programming questions