Python for kids ... and adults intimidated by the very idea of programming

Python for Kids by Jason R. Briggs (No Starch Press, 2013) is a super gentle introduction to Python and to programming in general. Rated for kids ten years and older (the back cover says 10+), the book has slightly enlarged print, witty illustrations, and a tone which is both fun and yet adequately authoritative. By the time you get through the first five chapters, you will have learned to express the age criteria for the book like this:

if age >= 10:
    print("You might really like this book!")
else:
    print("You're too young")

Even though this book is targeted at kids, it addresses basic programming concepts as well as Python syntax in ways that are both clear and accurate. For example, it explains the importance of indentation in Python, how orders of precedence in numeric operations work, and how single and double quotes are evaluated. Plus, it does so not only by showing examples that you can type and see how the commands work on your own system, but also by showing what happens when you type something that Python doesn't like and explaining why Python objects.

The explanations are sound and easy to understand -- something that is of value to readers of any age. In the first chapter, you install Python -- and this is a book that really should be read while sitting in front of a computer. Trying each command is a vital part of the learning process and the book walks you through one example after the other.

It also provides very good explanations of WHY you'd want to use certain features -- like loops and functions to keep you from having to repeat code. And it introduces concepts like variables by explaining that, in setting up a variable, you are providing a label for something, just like "age" became a label for your age.

Once you get through the installation of Python, you will move through assigning values to variables and using if-then and if-then-else constructs (though the "then" part of a Python if statement is expressed by the indentation as shown in the example above).

Chapter 3 covers strings, lists, tuples and maps.

Chapter 4 has you drawing with the turtle module.

Chapter 5 covers if and if-then-else commands.

By Chapter 6, you will be building loops that operate over ranges or once for each item in a list. Both for and while loops are explained with easy examples for you to try.

Chapter 7 covers both functions and modules.

By Chapter 8, the book moves into objects and object classes and subclasses, all the while wooing the reader with the same very easy to follow explanations and providing him or her with a very good feel for how object oriented programming relates to the real world.

Chapter 9 discusses built-in functions like len, min and max and working with files on Windows, Mac OS X, and Ubuntu systems.

Chapter 10 covers Python modules and reading from STDIN.

Chapter 11 provide more lessons on turtle graphics and is followed by 12 which shows the reader how to use tkinter for better graphics. These chapters provide more explanation on how to do basic animation, set up clickable buttons, etc.

In parts II and III (roughly 1/3 of the book), the reader is walked through the process of building some basic games -- one is a bounce game in which you create a game that uses a bouncing ball and a paddle. The other is a game called "Mr. Stick Man races for the exit" in which you animate a stick figure using simple illustrations prepared in GIMP. These may not be the most exciting games, but they are surely more than adequate to cement the reader's understanding of Python and maybe even convince some young or reluctant programmers that programming can be actually be both fun and rewarding.

Each chapter also includes a "What you learned" section to wrap up the most important concepts taught in that chapter.

Easy to read, but providing sound programming advice and very clear explanations of how programming languages work, Python for Kids is a great book for anyone who wants to break into programming without pangs of inadequacy. If you read each chapter, try the exercises, and read the "what you learned" section, you just can reach the end of the book without a solid understanding of how Python works.

Top 10 Hot Internet of Things Startups
View Comments
You Might Like
Join the discussion
Be the first to comment on this article. Our Commenting Policies