Monday, March 7, 2011

Python for Everyone At My House

I started teaching my youngest son python years ago. I started him with the turtle package and he drew circles, lines, and squares. He had a great time doing things like creating variables that carry his brother's name and setting them equal to "llama butt." Now he's older, and wanting to do some more programming.

We decided to start with a simple guessing game, and picked "battleship." I also decided that he's old enough to get a handle on tests and classes.

Tonight we decided what the rules were, and wrote some tests for creating ships and blowing them up. We'll be revisiting the stuff we've done, but by watching me and copying the text I typed he was able to run the tests a few dozen times, create a class, and start dealing with syntax and logic errors.

It's just a start. We'll have to get into it more deeply before we'll know if he really likes it, but I'll keep you posted.