3 ms·
I used this to demonstrate a few basic programming techniques to my nephew on a Raspberry Pi a few years ago. I asked him what he wanted to see and he said "a s
by bitwize 4y ago
I used this to demonstrate a few basic programming techniques to my nephew on a Raspberry Pi a few years ago. I asked him what he wanted to see and he said "a square train!" (Kid loves Minecraft, wants to see everything modeled in little cubes.) So I imported Python's turtle module and had it draw a train with square wheels, square boxcars, a square smokestack, etc. Then I showed him something called "refactoring", by taking the instructions to draw, say, a wheel, and putting them into a function so we can draw as many wheels as we like, anywhere, by calling it.
Anyway, it must've helped give him the bug because a couple years later he was asking to help me load software onto his Raspberry Pi-powered car, entering Linux commands with ease.
He turns 12 this year. He's probably outgrown Thonny. I bet he's ready for Emacs.