Al Sweigart is one of my tech heroes. His videos on Scratch inspired me to code and teach Scratch to hundreds of children. His Automate the Boring Stuff with Python is a bestseller. So when I came across another of his works, with "81 easy practice programs" as subtitle, I wanted to read and review it.
This book is for anyone who knows how to write simple Python programs. Simplicity is a guiding principle.
Code makes up most of each chapter. Since the idea is to learn by typing and running, there is just minimal explanation for each program. That said, most of the projects are interesting, and would make fun projects to implement for anyone looking to go beyond basics.
Unlike other books that one can read chapter-wise, this has 81! Hence, I’ve classified the projects I found interesting into a few buckets:
- Blackjack: Plays the game, has ascii art and Unicode
- Flooder: Great game to play + designing for disability!
- Four-in-a-row: Connect Four type game in python!
- Monty Hall with art - though I always lost when I swapped!
- Sliding Tile game
- Generating Clickbait Headlines
- Fast Draw
- Snail Race
- Trick Questions
- Seven Segment Display and projects that use it, like Digital Clock
- Periodic Table: Wonderful project used to display table and element data
- Hungry robots: The classic attacker game
- Mancala: I know this as pallanguzhi (பல்லாங்குழி), a game played in Tamil Nadu, India
- Ur: Ancient Iranian game with a complex board (ascii art again!)
- Maze Runner 3D: Using Ascii Art to get 3D perspective!
- Rotating 3D cube!
- Abacus simulator
- Sudoku, 2048 - Long but Cool!
Most of the code, even for the long projects, is simple. As I typed out the programs, I came across a many useful Python nuggets that were new to me.
There were nice bits where ascii art or animations were used to enhance the projects. One of the cool ones was to simulate a printer typing out character by character using the
flush parameter of the
for char in somestr: print(char, flush=True, end="") time.sleep(0.1)
Apart from the author-written
pyttsx3 in one project, there is not an extensive use of any third party modules. This is a good thing in a book of this nature as anyone just pickup the book, choose an interesting looking project, and complete it within a few hours.
Every project ends with a few questions for the reader to think about and changes to try out. These help the reader to explore the programs further and gain an understanding of how it works.
Al’s projects are oriented towards learners - the inclusion of games and fun projects is a testimony. The book will give the beginner the confidence needed to implement their own simple projects and games!
The Big Book of Small Python Projects
- Tags like tiny, large, beginner, word etc help the reader search for relevant projects in the book
- Well-known games are implemented: sudoku, tic-tac-toe, Rock Paper Scissors, Blackjack, 2048 etc
- Introduces the Mu IDE - It’s better than IDLE and less complex than VS Code.
- Quite a few practice enhancements to do after copying the code.
- A lot of ASCII Art! - calendar, carrot in a box, ducklings, Ur
- Though the
bextmodule is useful for text graphics, some projects, like Bouncing DVD, don’t add much to a learner. Also, programs that use
bextneed to be run from a terminal, and not from an IDE like VSCode or Mu or IDLE.
- There is only minimal explanation of the code. The reader is expected to make changes to the code and explore it to understand how it works
- Invariably mistakes will be made while typing the code, and the reader is expected to be able to identify the mistake and fix it. If not, it can be frustrating to type a couple of pages of code and then get stuck with an error
Did you like this article?
If you liked this article, consider subscribing to this site. Subscribing is free.
Why subscribe? Here are three reasons:
- You will get every new article as an email in your inbox, so you never miss an article
- You will be able to comment on all the posts, ask questions, etc
- Once in a while, I will be posting conference talk slides, longer form articles (such as this one), and other content as subscriber-only