main(credits and imports memory puzzle by al sweigart al@inventwithpython com released under "simplified bsdlicense import randompygamesys from pygame locals import at the top of the program are comments about what the game iswho made itand where the user could find more information there' also note that the source code is freely copyable under --simplified bsd|license the simplified bsd license is more appropriate for software than the creative common license (which this book is released under)but they basically mean the same thingpeople are free to copy and share this game more info about licenses can be found at this program makes use of many functions in other modulesso it imports those modules on line line is also an import statement in the from (module nameimport formatwhich means you do not have to type the module name in front of it there are no functions in the pygame locals modulebut there are several constant variables in it that we want to use such as mousemotionkeyupor quit using this style of import statementwe only have to type mousemotion rather than pygame locals mousemotion magic numbers are bad fps frames per secondthe general speed of the program windowwidth size of window' width in pixels windowheight size of windowsheight in pixels revealspeed speed boxessliding reveals and covers boxsize size of box height width in pixels gapsize size of gap between boxes in pixels the game programs in this book use lot of constant variables you might not realize why they're so handy for exampleinstead of using the boxsize variable in our code we could just type the integer directly in the code but there are two reasons to use constant variables firstif we ever wanted to change the size of each box laterwe would have to go through the entire program and find and replace each time we typed by just using the boxsize constantwe only have to change line and the rest of the program is already up to date this is email questions to the authoral@inventwithpython com