header image
Click to view the other books
Invent with Python cover thumbnail Making Games cover thumbnail Hacking Secret Ciphers cover thumbnail
Vote up on StumbleUpon.com

Downloads

Download all programs and files

hello.py
Chapter 4, Guess the Number
guess.py
Chapter 5, Jokes
jokes.py
Chapter 6, Dragon Realm
dragon.py
Chapter 9, Hangman
hangman.py
Chapter 10, Tic Tac Toe
tictactoe.py
Chapter 11, Bagels
bagels.py
Chapter 13, Sonar
sonar.py
Chapter 14, Caesar Cipher
cipher.py
Chapter 15, Reversi
reversi.py
Chapter 16, AI Simulation
AISim1.py
AISim2.py
AISim3.py
Chapter 17, Graphics and Animation
pygameHelloWorld.py
animation.py
Chapter 18, Collision Detection and Input
collisionDetection.py
pygameInput.py
Chapter 19, Sound and Images
spritesAndSounds.py [graphics files]
Chapter 20, Dodger
dodger.py [graphics files]

You can also download the Python 2 version of the programs in this book.

pickup.wav - The sound effect when an item is picked up.

gameover.wav - The music player when the game is over.

background.mid - Background music.

baddie.png - Image of the baddies.

cherry.png - Image of cherries.

player.png - Image of the player's character.

Copy and Paste

You can also select the text of the source code below, and copy & paste the code into IDLE.

(Click on the text field, then press Ctrl-C to copy.)