that invoked them as their first argumentand we don' want this event sowe use lambda function that accepts but ignores the event and calls the method without the unwanted argument we have also created two keyboard shortcuts--these are key combinations that invoke particular action here we have set ctrl+ and esc and bound them both to the self quit(method that cleanly terminates the program it is possible to create keyboard bindings for individual widgetsbut here we have set them all on the parent (the application)so they all work no matter where the keyboard focus is tk' bind(method can be used to bind both mouse clicks and key pressesand also programmer-defined events special keys like ctrl and esc have tk-specific names (control and escape)and ordinary letters stand for themselves key sequences are created by putting the parts in angle brackets and separating them with hyphens having created and laid out the widgetsand set up the key bindingsthe appearance and basic behavior of the program are in place now we will review the methods that respond to user actions to complete the implementation of the program' behavior def updateui(self*ignore)amount self principal get(( (self rate get( )*self years get()self amount set("{ }format(amount)this method is called whenever the user changes the principalthe rateor the years since it is the command associated with each of the scales all it does is retrieve the value from each scale' associated variableperform the compound interest calculationand store the result (as stringin the variable associated with the actual amount label as resultthe actual amount label always shows an up-to-date amount def quit(selfevent=none)self parent destroy(if the user chooses to quit (by pressing ctrl+ or escor by clicking the window' close buttonthis method is called since there is no data to save we just tell the parent (which is the application objectto destroy itself the parent will destroy all of its children--all of the windowswhich in turn will destroy all of their widgets--so clean termination takes place application tkinter tk(path os path join(os path dirname(__file__)"images/"if sys platform startswith("win")icon path "interest ico