3 ms·
I'm teaching Python to my kids (ages 10 and 13) right now, after finally ditching Visual Basic myself last year. Of course I'm at liberty to improvise my "syll
by analog31 13y ago
I'm teaching Python to my kids (ages 10 and 13) right now, after finally ditching Visual Basic myself last year.
Of course I'm at liberty to improvise my "syllabus." I decided to introduce lists before program flow. I introduced range() as a way to populate a list. And then we started doing things with lists using constructs like [x2 for x in range(-10, 10)].
At that moment, my daughter asked: "Can we use Python to make a graphing calculator?" With my syllabus in tatters, we installed matplotlib and played with it a bit. I've explained to my kids that in programming, sometimes we have to look up and use things before we fully learn how they work.
This approach would probably make no sense for teaching C, where looping comes before lists. But in my idiosyncratic mental map of Python, lists come before looping.
I'm not dogmatic about what first language to learn. My only intention right now is to see if my kids will take an interest in it.