As I’ve mentioned before, I’ve been spending Friday evenings programming with my 10-year-old, while his older sibling practices with his soccer team. We started out with python, did some work with Google Fusion Tables, and last week and this week again we’re back to Python. Someone at a recent THATcamp shared a link to Invent With Python and it’s been great fun for us to work through. So now instead of creating from scratch, we’re working through the examples and tweaking them here and there.
Here’s what we did to Chapter 4: Guess the Number. To run this code you’ll have to copy and paste it in a text editor, save it (numberguessing.py) and run it from the terminal (type: python numberguessing.py). You can really see my kid’s…uh…sense of humour… in these programs. Keep in mind he’s a beginner. I realize some line breaks, etc would add to the aesthetics, but I’m trying to reduce cognitive overload. One thing at a time!
You might argue that this makes my kid look pretty rotten, but I promise you, he really is a sweetheart.