Education

Sparking My Kid’s Interest In Coding

My niece is learning to code using pygame. Pygame is a Python based module for writing games. When she told me, I hopped on to YouTube to watch a tutorial with Zak (7) to see if we can learn together. Hmm. It was quickly clear. He was going to need some basics first.

After he went to bed, I decided to script a simple text-based game that might enjoy. It also had the oblique purpose about teaching him the basics of business math. You’ll recall I planted this seed with Zak and his podmate back in the fall. I described the process in A Socratic Money Lesson for 2nd Graders.

I’ve shared the game with cousins and his friends, and it gives them a quick little competition. It encourages them to read, reason, and do basic arithmetic. After they played it for awhile, I told him I wrote it. Now I can’t really code but it was just enough for the desired effect — he would think “whoa, we have the power to make a game!”. Now he is interested in at least messing with Python and trying to learn some basic syntax.

Share it with your kids and see how much money they can make at the Ice Cream Shoppe. (game)

Here’s the code. It’s not pretty but it should be easy enough to spot how to change it. (code)

The game takes less than 2 min to play. And it will introduce you to Trinket, a great site for writing and running programs in a browser.

The 4-year-old wanted to play a game too. He’s learning basic addition and loves chess so I wrote him an even simpler game. It encourages arithmetic by adding the values of chess pieces. He can’t read but his bro wrote a cheatsheet on a piece of paper so he can match the words on the screen with the word on the paper. Over time, he is figuring out that the word that starts with “p” is “pawn”.

Play it here. (chess piece game)

editor

Recent Posts

“you can’t change minds” — an interview with Victor Haghani

A great Munchie today. As usual, I highlight the parts I want to keepsake and…

3 days ago

Iron Condor Destroyer

Workflows are Moontower’s screeners organized around what you’re trying to do: sell premium (Income), buy…

6 days ago

the farmer’s almanac for investing

Exponential Wealth: Centuries of Stock and Bond Returns free PDF · 380 pp. In 1976,…

6 days ago

Moontower #331

Note of an Instagram Experiment I’m trying something new that has become much easier with…

6 days ago

vibey vs discrete trades

At the Robinhood Summit last week, Mat Cashman and I hosted a “Trading Lab” emphasizing…

1 week ago

2 option ideas from the Robinhood Summit 2026

Mat Cashman and I did a teach-in session to a large audience of conference-goers who…

2 weeks ago