Book Review: Python For Kids – A Playful Introduction to Programming

Posted by Mike on January 29th, 2013 filed in Books, Python

I was approached by a representative from No Starch Press, the publisher of Python For Kids, to review their book. They provided me with a free dead tree copy and an eBook (PDF) version. This book appears to be in direct competition with Manning’s Hello World! Computer Programming for Kids and Other Beginners by Sande. I’ll do a quick review and then you can read the more detailed review after the jump if you’re still interested.

Quick Review

  • Why I picked it up: Primarily because I asked by the publisher to read it. However, I find these extreme beginner books interesting in their own right. I just didn’t want to spend my own money on it. It’s also a Python 3 book!
  • Why I finished it: Actually, I didn’t finish it. The book is quite good, but it’s a beginner book and I ended up skimming it after I read about halfway through. But this is a well written book with an engaging writing style.
  • I’d give it to: I would give this book to someone with kids in high school who are interested in programming in general or Python specifically.

Book Formats

This book is available as a paperwork text book or as a PDF eBook.

Full Review

The author of Python For Kids is Jason R. Briggs. This text is based on Python 3, which is kind of cool. I think it’s the first beginner book for Python 3 that I’ve read. The text is very readable and the author does a good job of breaking the language down for his readership, especially for the first half of the book. By the time we reach classes, it seems more like a regular beginner book and not one that’s for kids necessarily. The chapters are short and to the point and they have exercises at the end of each one. The author uses the turtle library in some examples in an attempt to make things more interesting. I think this is an interesting approach, but he doesn’t use it in every chapter, so it’s a little inconsistent.

There are a couple of oddities though. For example, on page 5, the author states that Python doesn’t use “complicated symbols, like braces ({}), hashes” etc when in fact Python DOES use those. Hashes are used for comments and braces are used for dictionary objects. There’s also some odd naming conventions going on in the book. He describes string substitution (or insertion) as “embedding values”. I’ve never seen it described that way in any other Python book. There’s nothing particularly wrong with describing it that way, but you may not get the best results if you were to search for that topic with those key words. He also uses the old method of string insertion:

print ("My name is %s" % "Mike")

Whereas the new way that I usually see in relation to Python 3 is something more like this:

print ("My name is %(name)s" % {"name":"Mike"})
# or
msg = "My name is {0}".format("Mike")
print (msg)

I think the biggest issue I saw in the text that I read was on page 39 where it described a Python map which the author described as another word for dict. The map command is a builtin Python function that applies a function to each item in an iterable. I think that whole section is poor because the student reading it will think that map and dict are one and the same and they aren’t even close. If the student tries to find examples of a dict by looking up a Python map, they will be very confused!

Enough of that, let’s take a quick tour of the chapters so you know what you’re getting if you decide to purchase:

The book has 3 parts. The first part is made up of 12 chapters. The first 3 chapters cover variables, tuples, lists, and “maps” (i.e. dictionaries). In chapter 4 we draw with the turtle library. Then we go back to basics with chapter 5 talking about conditionals (if/else) and 6 discusses loops. Chapters 7 and 8 go into Object Oriented land with functions, classes, modules and objects. Chapter 9 is about some of Python’s builtin functions, but not very many. Chapter 10 appears to be just an overview of the author’s favorite builtin modules, like copy, keyword, random, etc. Chapter 11 goes back to using the turtle module to draw graphics and shapes. Finally, chapter 12 is a taste of Tkinter, the GUI toolkit that is included with most Python distributions. It looks like the author shows how to draw with Tkinter in much the same way as he did with turtle and also shows a few of Tkinter’s other tricks.

In part II, the author takes some time to teach the reader about games using Tkinter. He uses two chapters to create a game with a bouncing ball and a paddle. Part III is also game related. This time the author create a game with stick man using sprites created in GIMP with the game itself built using Tkinter. I’m not sure why you’d use Tkinter instead of something like pyGame except that pyGame isn’t included with Python.

Conclusion

Overall I found this book pretty interesting. If you have a high schooler (or a very brainy middle schooler) then this book might be for your kid! I think this book would also be good as an introductory text on Python in college or just for someone trying to pick up the language. As usual it has a couple of rough edges (the map/dict thing being the only major one I saw), but I think those are easy enough to overlook.

python4kids

Python For Kids

Jason Briggs

Amazon

Print Friendly

  • jmafc

    I haven’t read the book, but I think the comment about Python not using braces refers to C, C++, Javascript, etc., which use braces for code blocks whereas Python uses indentation for that purpose. I suspect that hashes refers to the C/C++ preprocessor usage of that symbol.

    Regarding map and dict, I suggest you look at the Wikipedia article on associative arrays, which states “In computer science, an associative array, map, or dictionary …”. In fact, I think “map” is the more common name for what Python chose to call dict. Plus, even the Python docs call dict a “mapping type.”

  • driscollis

    I know what he meant, but Python DOES use them. The statement seemed to indicate that Python doesn’t use hashes and braces at all. And I realize that Python’s dictionary data type is also called a mapping type, however no one in the Python universe that I’ve ever seen has called a dict a map. I’ve read at least 2 dozen Python books and none of them describe it that way.

  • jmafc

    I disagree with your interpretation of the statement. I think context is always very important so I took the trouble of finding that passage:

    “A number of things about the Python programming language make it extremely useful for beginners. Most importantly, you can use Python to write simple, efficient programs really quickly. Python doesn’t have a lot of complicated symbols, like braces ({}), hashes (#), and dollar signs ($), which make other programming languages a lot more difficult to read and, therefore, a lot less friendly to beginners.”

    Although braces are used in Python, you don’t have to use them unless you’re creating/initializing dicts (or sets, more recently) and in fact, you *don’t* even have to use them since you can use dict(). In C, C++, Javascript, you *can’t* write a simple program/function without at least one pair of braces.

    As for dicts, I think it’s quite reasonable and acceptable to use the term “map” in a book addressed to kids, regardless of what adult books may use. And in the book section, I don’t see any possibility of confusion between a “Python map” (a noun) and the map built-in (a function or “verb”).