In my (very limited) experience, building text adventures is a great way to teach kids programming:
* You don't need any complicated stuff for it, just printing to stdout and reading from stdin.
* Kids love making up stories and games
* When they understand the basics you can gradually increase the complexity: Add if/then/else conditions (do you wanna go left or right?), functions (e.g. to parse answers to questions), variables and simple arithmetic (treasures found, monsters fought, ...) and libraries (e.g. for adding randomness to the game).
And if they're hungry for even more afterwards, you can add some graphics programming into the mix. By then they should be motivated enough by their story that they actually want to learn something more complex and challenging.
I'd recommend a scripting language to get started, as it removes the need to compile code, which (IMHO) just adds unnecessary complexity.
Not sure if this is the best approach, I tried it once and it worked great though!
* You don't need any complicated stuff for it, just printing to stdout and reading from stdin.
* Kids love making up stories and games
* When they understand the basics you can gradually increase the complexity: Add if/then/else conditions (do you wanna go left or right?), functions (e.g. to parse answers to questions), variables and simple arithmetic (treasures found, monsters fought, ...) and libraries (e.g. for adding randomness to the game).
And if they're hungry for even more afterwards, you can add some graphics programming into the mix. By then they should be motivated enough by their story that they actually want to learn something more complex and challenging.
I'd recommend a scripting language to get started, as it removes the need to compile code, which (IMHO) just adds unnecessary complexity.
Not sure if this is the best approach, I tried it once and it worked great though!