gui programming with tkinter up until nowthe only way our programs have been able to interact with the user is through keyboard input via the input statement but most real programs use windowsbuttonsscrollbarsand various other things these widgets are part of what is called graphical user interface or gui this is about gui programming in python with tkinter all of the widgets we will be looking at have far more options than we could possibly cover here an excellent reference is fredrik lundh' introduction to tkinter [ basics nearly every gui program we will write will contain the following three linesfrom tkinter import root tk(mainloop(the first line imports all of the gui stuff from the tkinter module the second line creates window on the screenwhich we call root the third line puts the program into what is essentially long-running while loop called the event loop this loop runswaiting for keypressesbutton clicksetc and it exits when the user closes the window here is working gui program that converts temperatures from fahrenheit to celsius from tkinter import def calculate()temp int(entry get()temp / *temp+ output_label configure(text 'converted{ fformat(temp)entry delete( ,end