Coders Packet

EMI Calculator using Python Tkinter

By Sumedha Kulkarni

In this tutorial, we will be learning how to create an EMI calculator using Python's Tkinter.

1)Import module Tkinter

from  tkinter import *

2) Create the main window

               A window is an instance of Tkinter’s Tk class.

               Set the dimension and title.

window = Tk()

3)Add widgets

              i)Adding a widget has two steps:

                             a)Create a widget.

                             b)Add it to the window.

             ii)Three labels are created to get user input for amount, rate of interest, and tenure. Three entry boxes are created respectively.

4)Associate a callback function with an event using the command binding.            

             First, define a function as a callback.

             Then, assign the name of the function to the command option of the widget.

             Create a function that will calculate the EMI.

             Create a button.