Ask HN: Coding assignments for kids
I am teaching a 12-year-old to program in Python. She has learned the basics: input and output, loops and conditionals, arrays, sorting, etc., and she is beginning to learn OOP. The hard part of teaching kids to code is coming up with interesting yet not-too-hard coding assignments. I am looking for ideas.
My approach to teaching is to not focus on learning features of the programming language one by one, but to solve interesting problems, and learn programming language features necessary to solve the problem. To keep kids interested the problems have to be relevant and understandable and somewhat interesting.
Here are some examples of programs she has already written: Number guessing game. Calculating BMI (Body Mass Index). Celsius to Fahrenheit conversion. Add 8.75% sales tax to calculate total price.
I now need some harder assignments and I am running out of ideas.
13 comments
[ 3.3 ms ] story [ 35.8 ms ] threadThe only downside to this games approach is that unless you structure the process right, it might take a few sessions to get anything that feels even remotely like a game, and the kids can get bored.
Good luck!
Since she's got the basics of conditionals, she could make a simple text based choose-your-own-adventure type RPG.
http://www.amazon.com/Think-Like-Programmer-Introduction-Cre...
http://py.processing.org/
https://processing.org/
- Games - Pretty pictures - Music
Someone suggested python processing. This might be cool. Also, pygame can be fun. For games, you could introduce the kid to the game of Nim, learn a strategy to always win, and the kid can program the strategy. Make it a real game that someone might load up and play, with whatever graphics, sound, and experience the kid wants.
Having the computer be the blackjack dealer would be another option.
Now, of course, the difficulty here is that the young programmer may want to write programs that are beyond his knowledge and abilities. For example, I wanted to write a basic interpreter, and not having recursion, I had a very hard time with parenthesized expressions. I also wanted to do a 3D universe simulation, way beyond my and my computer capabilities at the time. :-)
But as an experienced programmer, you can find out what she wants to program, and direct her teaching to let her make progress toward this goal.