dark mode light mode Search Menu

Teach Your Kids to Code

Josh Ellingson for No Starch Press

Python is a really interesting programming language. It’s extremely easy to learn the basics and evolve to creating applications.

Yet Python is geeky. It is used a lot in science fields, as well as scripts and applications in corporations. There are no major open source Python projects like WordPress and Joomla for the PHP programming language that allow you to build websites without knowing much (or any) PHP. However, there are Python projects like Flask that let you build websites if you know Python.

Python is arguably one of the best languages for beginners to learn because it is well designed and much of what you learn can easily translate to other languages. You can play with Python and never go beyond a few basic commands and ideas. Or you can learn how to build full blown applications. And you can leverage what you know about Python to learn Ruby, JavaScript, Java, and other languages.

This dual quality of Python — lots of fun and easy to use yet serious and capable — makes it the perfect language for kids to learn. Even better, it’s the perfect language for parents to teach their kids so both learn a little programming together.

No Starch Press has published a book to help parents do exactly that, Teach Your Kids to Code. As their subtitle says, it’s a parent-friendly guide to Python programming. It also happens to be an excellent guide to learn Python if you’re single, elderly, a Martian, and otherwise don’t fit the parent plus child model.

The book begins by making an important point: people shouldn’t learn to code simply to become programmers. Learning how programming languages work, having a little fun making your computer do things, can expose you to how technology works in our daily lives. Learning to code helps people become active consumers, and in many cases, creators of technology, instead of passive consumers of technology.

Once expectations are set, and you have a Python environment set up on your computer, the book dives into a really fun part of Python, the ability to draw all sorts of lines and squares and circles with a few lines of code. The magic is in a library of code called Turtle. Your first line of Python code imports this library into your small application. Then you get to go a little nuts, telling your computer with a few simple lines of code how and where to draw squares, circles, spirals, add color, and more. And all the steps are clearly explained. It’s a fun, easy introduction to Python.

From drawing pictures, the book leads you through math, loops, conditional logic, randomness, and other concepts before launching into fun ways to use Python to create games. For example, the book shows how to use a lesson on creating random choices to code a simple card game. Or you can update the Pong game to use smiley faces. More seriously, you also learn how to retrieve clicks and other user inputs to make games work.

This approach lets you learn Python as little or as much as you want with your kids, or by yourself. If you’re really motivated, you also can learn how to code a number of fun games.

Learn More

Teach Your Kids to Code (No Starch Press)


Related Posts