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)