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

Learn how to program!

Everyone in the 21st century needs to learn to code, right? But not everyone needs to become a software engineer or computer scientist. Automate the Boring Stuff with Python is written for office workers, students, administrators, and anyone who uses a computer how to write small, practical programs to automate tasks on their computer.

You don't need to know all the complexities of algorithms and syntax, you just want to write basic programs to automate mundane computer tasks. In the process, even total beginners will learn to use Python to control their computers without having to learn complex information about computer science. This is a practical programming guide for the rest of us.

You can also take the online course of this book on Udemy. Use coupon code INVENT_WITH_PYTHON for an 80% discount.

Game programming for young adults!

Scratch Programming Playground teaches you how to program in Scratch, the introductory programming language from MIT. It features 8 game and art projects.

Scratch Programming Playground is for young adults or parents/teachers who want to lead kids through a fun programming journey.

There is also an online Udemy course that follows the book. You can sign up for free using the coupon code INVENT_WITH_SCRATCH.

Develop video games!

Invent Your Own Computer Games with Python teaches you how to program in the Python language. Each chapter gives you the complete source code for a new game, and then teaches the programming concepts from the example.

Invent with Python is for young adults, adult adults, and anyone who has never programmed before. The 3rd edition is still available on the web and Amazon.

Make games with graphics!

Making Games with Python & Pygame covers the Pygame library with the source code for 11 games. Making Games was written as a sequel for the same age range as Invent with Python. Once you have an understanding of the basics of Python programming, you can now expand your abilities using the Pygame library to make games with graphics, animation, and sound.

The book features the source code to 11 games. The games are clones of classics such as Nibbles, Tetris, Simon, Bejeweled, Othello, Connect Four, Flood It, and others.

Encrypt messages and hack ciphers!

Hacking Secret Ciphers with Python teaches complete beginners how to program in the Python programming language. The book features the source code to several ciphers and hacking programs for these ciphers. The programs include the Caesar cipher, transposition cipher, simple substitution cipher, multiplicative & affine ciphers, Vigenere cipher, and hacking programs for each of these ciphers. The final chapters cover the modern RSA cipher and public key cryptography.

100% of the proceeds from this book are donated to the Electronic Frontier Foundation, the Creative Commons, and the Tor Project.


“This book is totally appropriate for someone who has never programmed before. Everything is explained, right from the ground up, in a lively, interesting style which doesn't dumb things down.”
- J. Hartley, tartley.com  
Read full Amazon review  
“I am a college professor who occasionally teaches courses for liberal arts students. [...] I offered a game programming course in the Python programming language using Sweigart's book. The students loved this book. It starts at the very beginning and leads them, game by fascinating game, to become highly capable programmers.”
- Dr. Robert C. Gann  
Read full Amazon review  
“I picked up a copy of this book and was in all honesty blown away by how easy the concepts of python are introduced to the reader in a clear and concise manner. The fact that you are also making small little games with your programs throughout this book helps with motivation as tasks get harder and harder - it keeps it all fun while learning. ”
- Tor Hagen  
Read full Amazon review  
“It provides a simple introduction both to programming, and to Python. The book and examples are also available online at the book's website under a Creative Commons Attribution-NonCommercial-ShareAlike license, so you're also supporting free culture business models by buying this book.

This book is particularly effective at getting you started, and so if you've tried to learn programming before and failed or gotten stalled, I highly recommend this as the approach for you.”
- Terry Hancock, Free Software Magazine  
Read full review  
“This Spring, we used this book for six weeks of a homeschool "Physics and Modeling" class. I am extremely happy with the book. It received many compliments from the students for ease of use, the hands-on approach, and the fact that game programming starts right away.”
- Maria A. Droujkova naturalmath.com  
Read full Amazon review  
“I used to write a column on a greek magazine about learning Python and PyGame. [...] Since I found this book, every time the topic of learning programming is mentioned - especially from a person interested on making games - I point people to it.”
- Konstantinos Michalopoulos  
Read full Amazon review  
“My name is Felix. I'm ten years old, and I really liked your book on game programming with python.”
- Felix D. (email to the author)  

Educational Discount

If you are an educator, visit the Education Discount page for a over-50% education discount code.

Programming Books I Recommend (if you don't mind paying)

These books take a more conventional approach to covering programming concepts. They don't focus on having complete source code for small projects or games, but they do explain programming concepts fairly well.

"Python for Kids" is a new book from No Starch Press specifically aimed at a young reader. "Programming the Raspberry Pi: Getting Started with Python" is a great book to learn Python if you have purchased a Raspberry Pi.
"Super Scratch Programming Adventure!: Learn to Program By Making Cool Games" is a great book for younger kids (8 to teens) to learn MIT's graphical Scratch programming environment to quickly make games. "Python Programming for the Absolute Beginner, 3rd Edition" is a great book to learn Python if you have never programmed before.
"The Quick Python Book, 2nd Edition" is a great book if you are already a programmer and want to learn Python, or just want to quickly get up to speed with various programming concepts. "Programming Video Games for the Evil Genius" teaches the Java programming language, but takes a similar approach to "Invent with Python" by having the source code to various games.
"Hello World! Computer Programming for Kids and Other Beginners" covers the basic concepts like "Absolute Beginner" and "Quick Python" do, but is more purposefully aimed at younger readers. "Violent Python: A Cookbook for Hackers, Forensic Analysts, Penetration Testers and Security Engineers" is devoted to using Python for modern computer security.


Ask programming questions or send comments to [email protected].