self buttons append(button(self winpoint( , ) "=") could have written line like this for each of the previous buttonsbut think you can see the appeal of the specification-list/loop approach for creating the similar buttons in contrast to the buttonscreating the calculator display is quite simple the display will just be rectangle with some text centered on it we need to save the text object as an instance variable so that its contents can be accessed and changed during processing of button clicks here is the code that creates the displaybg rectangle(point , )point( , )bg setfill('white'bg draw(self wintext text(point( , )""text draw(self wintext setface("courier"text setstyle("bold"text setsize( self display text processing buttons now that we have an interface drawnwe need method that actually gets the calculator running our calculator will use classic event loop that waits for button to be clicked and then processes that button let' encapsulate this in method called run def run(self)while truekey self getkeypress(self processkey(keynotice that this is an infinite loop to quit the programthe user will have to "killthe calculator window all that' left is to implement the getkeypress and processkey methods getting key presses is easywe continue getting mouse clicks until one of those mouse clicks is on button to determine whether button has been clickedwe loop through the list of buttons and check each one the result is nested loop def getkeypress(self)waits for button to be clicked returns the label of the button that was clicked while trueloop for each mouse click self win getmouse(for in self buttonsloop for each button if clicked( )return getlabel(method exit