Pages: 378
Published: December 18, 2021
Published by: Addison-Wesley
Co-author: Shmuel Forta
ISBN: 0137653573

Legend tells of individuals with astounding powers. Scattered around the globe they have been endowed with the ability to bring the inanimate to life. Issuing instructions in varied languages, they can bend machines near and far to their will, making them do their bidding. These individuals are awesome and powerful, for they are … coders!

<ahem> Sorry!

Ok, so we may have gotten a bit carried away there. But coders are indeed awesome and powerful. We should know; we’re coders, and we think that we’re pretty awesome and powerful (if we do say so ourselves). The truth is that, for most of us, the closest we’ll ever to get to being Gandalf, Wonder Woman, Bruce Wayne, Luke Skywalker, Queen Elsa, Tony Stark, or Deadpool is mastering coding and developing the ability to command machines to do our bidding.

Yep, it’s pretty heady stuff, we know. But truthfully, that’s what coding is. Which means superpowers are quite attainable.

We believe everyone should learn to code, whether they intend to pursue careers in coding or not. We believe this just like we believe that everyone should draw and sketch, and everyone should play an instrument, and everyone should cook, and everyone should take pictures and shoot videos, and more. All of these are creative endeavors, which means that they are ways to actually create stuff, and creating stuff is incredibly rewarding and satisfying. Sure, it’s fun to spend hours on your phone looking at what other people have created; but that’s nothing compared to the joy and satisfaction of creating stuff that other people consume and use.

Great, so you should learn coding. But where to start? In our experience, too many books, videos, and lessons overly focus on the mechanics of coding – things like syntax and exact details of how to use specific language elements. They get caught up in the minute details of specific projects. It all feels a whole lot like being talked to, as opposed to being encouraged to tinker and play. And that’s boring. As in really enthusiasm-draining, soul-crushingly, yawn-inducingly boring. It’s kinda like spending hours and hours learning dictionary words and grammar and then getting to use those by copying someone else’s writing, and not being given the chance to find your own words and voice. That’s crazy, right? And yet that’s how most people are first introduced to coding.

We’ve been teaching coding for many years. In fact, we’ve helped over a million people become coders, including lots of young people your age. And we know how to help you develop these skills – we do it the same way we taught ourselves to code. It’s fast, fun, results oriented, and it works.

And that’s why we wrote this book for young people like you (aged 10-18 or so) and for anyone young-at-heart. You’ll learn by creating and playing games, starting small, and rapidly becoming quite sophisticated.

Using these games, we’ll help you learn how to code, but that’s not enough. We’re also going to help you learn how to think like a coder, analyze problems like a coder, plan like a coder, progressively iterate like a coder, craft elegant solutions like a coder, even talk like a coder … In fact, when we’re done, you’ll have discovered your coding superpower and will have morphed you into <drumroll> a coder!

Yep, becoming a coder is all fun and games!

Chapter listing

  • Introduction
  • Part 1: It’s All Fun & Games
    1. Getting Started
    2. Mad Libs
    3. Roll the Dice
    4. Calculate the Day
    5. Rock Paper Scissors
    6. Secret Codes
    7. Guess the Number
    8. Becoming a Coder
    9. Hangman
    10. Keep Going

  • Part 2: On an Adventure
    1. Getting Func-ky
    2. Exploring
    3. Cleanup Time
    4. Reduce, Reuse, Recycle, Refactor
    5. Carrying (and Using) Stuff
    6. Staying Classy
    7. Color Your World
    8. Keep Going

  • Part 3: Hit the Road
    1. Crazy Driver
    2. Image-ine the Possibilities
    3. We Like to Move It
    4. Crash Bang
    5. Finishing Touches
    6. Keep Going
  • What Next?
    1. Bonus Chapter

Book Code

Had enough of typing the code examples? Yeah, we understand. You can find all the code here ready for you to copy and paste.


Looking for solutions to the challenges? You’ll find them right here.

Resources (by chapter in which they are mentioned)

Chapter 1

As we explain in Chapter 1, you really just need two things to get started on your journey to become Captain Code:

  • Python (just download the latest version for your Windows or Mac computer)
  • Visual Studio Code (again, select Windows or Mac as appropriate)

Chapter 1 walks you through what to do with these, so just follow the instructions and you’ll be good to go.

Are you a Chromebook user? We love our Chromebooks, and some (but not all) can indeed be used to learn and code Python. If you are using a Chromebook, this page has everything you need to know.

Chapter 12

You can find the story starters mentioned in Chapter 12 on the Code page, just scroll down to Chapter 12: Exploring.

Chapter 19

Ready to create the Crazy Driver game? Click here to download the game images, and then follow the instructions in Chapter 19.

Chapter 25

Looking for bonus Chapter 25? Here it is!


If you are an educator using Captain Code in the classroom, thank you. We created this book as educators ourselves based on our own experiences inspiring young people by introducing them to coding. We are humbled and honored at the prospect of helping you do the same for your own students. To assist you we have created extra resources for you to use in the classroom. These include additional assignments and challenges, as well as educator notes and talking points. To access the Captain Code: Educators page, please contact us (or email