entry settext(' 'again the same method name is used as with text object in this case chose not to leave the entry initially blank the value also reinforces that numerical value is expected there is also an entry with almost identical code after waiting for mouse clickboth entries are readand the chosen names emphasizes they are strings the strings must be converted to integers in order to do arithmetic and display the result the almost identical code for the two entries is strong suggestion that this code could be written more easily with function you may look at the identically functioning example program addentries py the only changes are shown below first there is function to create an entry and centered static label over it def makelabeledentry(entrycenterptentrywidthinitialstrlabeltextwin)'''return an entry object with specified centerwidth in charactersand initial string value also create static label over it with specified text draw everything in the graphwin win ''entry entry(entrycenterptentrywidthentry settext(initialstrentry draw(winlabelcenter entrycenterpt clone(labelcenter move( text(labelcenter,labeltextdraw(winreturn entry in case want to make more entries with labels laterand refer to this code againi put some extra effort inmaking things be parameters even if only one value is used in this program the position of the label is made units above the entry by using the clone and move methods only the entry is returnedon the assumption that the label is staticand once it is drawni can forget about it since do not refer later to the text objecti do not bother to name itbut just draw it immediately then the corresponding change in the main function is just two calls to this functionentry makelabeledentry(point(win getwidth()/ ) ' ''first number:'winentry makelabeledentry(point(win getwidth()/ ) ' ''second number:'winthese lines illustrate that statement may take more than one line in particularas in the shellpython is smart enough to realize that there must be continuation line if the parentheses do not match while was improving thingsi also changed the conversions to integers in the first version wanted to emphasize the existence of both the string and integer data as teaching pointbut the num str and num str variables were only used onceso more concise way to read and convert the values is to eliminate themnum int(entry gettext()num int(entry gettext()color names thus far we have only used common color names in fact there are very large number of allowed color namesand also the ability to draw with custom colors firstthe graphics package is built on an underlying graphics systemtkinterwhich has large number of color names defined each of the names can be used by itselflike 'red''salmonor 'aquamarineor with lower intensity by specifying with trailing number or like 'red for dark red graphics