2 ms·
Turtle graphics is one of the "batteries" included with Python; I used Python with the turtle library to introduce my nephew to some of the basics of programmin
by bitwize 2y ago
Turtle graphics is one of the "batteries" included with Python; I used Python with the turtle library to introduce my nephew to some of the basics of programming a few years ago. Even got to show him function definitions by first coding each instance of a repeated part of the picture separately, and then saying "Now this is what programmers call 'refactoring'" and then pulling the repeated bit out into a function with different call sites and parameters.
He was excited enough about it to want to learn about robotics and aspire to be a programmer for Mars rovers and the like.
- int_19h 2y agoThe nice thing about Python is that because it's so pervasive as a teaching language, there are many tools for it that specifically cater to this niche. In particular, https://thonny.org https://thonny.org is very nice for explaining basic programming concepts like expression evaluation and function calls. And yeah, turtle graphics is the time-honored method of teaching things like loops, recursion, and parametrization via functions step by step in a way that is visually intuitive. Things like polygons, stars, spirals, and eventually basic fractals like snowflakes and ferns.
- bitwize 2y agoThonny comes on the Raspberry Pi. I used it to go through that little exercise with my nephew.