Each chapter focuses on a single game program and explain how different parts of the code work. It is very helpful to copy these programs by typing in the code line by line from this book.
However, you can also download the source code file from this book's website. In a web browser, go to the URL http://invpy.com/source and follow the instructions to download the source code file. But typing in the code yourself really helps you learn the code better.