January 18, 2007
Learning to Program
Last year I visited my son's second-grade classroom to teach an hour of Logo, and it was a blast. So tomorrow, I am going to try again. This time, instead of using Logo, I will be trying to teach a small group of third-graders the basics of python.
Teaching python means that it will be a taste of real programming without the sugar-coating of "educational" software. I have two hours instead of just one, but python was designed for pros, not kids. Will the kids be able to learn it? We shall see.
Our goal will be to finish a simple game - hangman.
I have posted my Learning to Program with Python walkthrough here.
Yay, what fun. Teacher Bob MacNeal posted some pictures here.
More thoughts on teaching python below.
A Turtle versus a Command-Line
Over email, Dave Maymudes asked the same question as Nelson asks below - does the "computer as a calculator" approach capture the kids' interest? Teaching command-line programming doesn't give you the sort of graphical feedback that Logo's turtle does.
But the kids actually loved just working with the console! After I showed them how to multiply numbers, they filled the whole line with 9999s to multiply. When python actually told them the answer, they were pretty amazed. "Cool, how did it do that?" In third grade, arithmetic is still pretty novel.
Simple things like concatenating strings "red" + "yellow" into "redyellow" got laughs. And of course everybody had to try "red" * 9999999 and then press control-c when their screen filled up.
How Much Could They Follow?
The whole thing took about two and a half hours, which we split into two days (the first hour was up to about page 9). The kids worked in pairs.
They really only understood the details up to about page 11 - you can tell where the limits were because past this point the kids stopped making up their own variations and just starting following along exactly. Nesting the "if" inside the "for" was probably past the outer edge of what most of the kids were actually able to understand.
So the second hour was really more about letting the kids follow along in the process of programming rather than really understanding the details. When I was a kid I spent hours typing in Atari 800 programs I found in magazines that I didn't understand - the second hour was definitely a dose of that.
Was python easy enough? Python is very easy to read, and the kids had the "feeling" of understanding the program. But python is harder to write than it is to read. Most of the kids had trouble with the whitespace alignment needed by python, and I had to go around and fix their spacing for them in order to make it through the exercise in time.
But in the end, all the kids had a hangman game they could play. The only thing we didn't get to was the hangman-drawing fun on page 15 - we tried everything else in the deck. Maybe next time I'd start with the hangman-drawing code as the first thing to try in a script. It might help the kids understand "if" while having fun drawing funny ASCII art - maybe this would be a good thing to do with a third hour.
Kids are Good Designers
At page 13, the kids had a functional hangman game that they could play, and I asked them, "tell me what is wrong with your game?"
All the hands shot up, and they were able to immediately suggest improvements: "The game doesn't stop when you win;" "it picks the same secret word every time;" "it doesn't draw a hangman guy."
In third grade, kids attack design issues with clear eyes, totally fearless, articulate, and confident about the way things should work. It is a skill that I hope they keep as they grow up.
Was it worthwhile? I think so.Posted by David at January 18, 2007 06:37 PM
|Copyright 2007 © David Bau. All Rights Reserved.|