much betterespecially since we might use the integer value for something else besides the size of the white boxesand changing that accidentally would cause bugs in our program secondit makes the code more readable go down to the next section and look at line this sets up calculation for the xmargin constantwhich is how many pixels are on the side of the entire board it is complicated looking expressionbut you can carefully piece out what it means line looks like thisxmargin int((windowwidth (boardwidth (boxsize gapsize)) but if line didn' use constant variablesit would look like thisxmargin int(( ( ( )) now it becomes impossible to remember what exactly the programmer intended to mean these unexplained numbers in the source code are often called magic numbers whenever you find yourself entering magic numbersyou should consider replacing them with constant variable instead to the python interpreterboth of the previous lines are the exact same but to human programmer who is reading the source code and trying to understand how it worksthe second version of line doesn' make much sense at allconstants really help the readability of source code of courseyou can go too far replacing numbers with constant variables look at the following codezero one two twoandthreequarters don' write code like that that' just silly sanity checks with assert statements boardwidth number of columns of icons boardheight number of rows of icons assert (boardwidth boardheight = 'board needs to have an even number of boxes for pairs of matches xmargin int((windowwidth (boardwidth (boxsize gapsize)) ymargin int((windowheight (boardheight (boxsize gapsize))