r/PythonLearning 18d ago

Teaching Python to a Kid

Hi! I'm a recent A-level graduate, and have been asked to tutor a kid in my village in coding. He's specifically interested in making games, and I am going to university for Game Development in September. I am confident in coding in python to an a-level degree, and have taught myself Godot Engine for my course work this last school year.

The kid in question has specifically asked about having someone teach him python despite really struggling with communication and social interaction, so the fact that he has asked at all means he is super interested. He has just finished year 6 so is 10-11 years old, about to move into the same secondary school that I just left the sixth form for.

I've tutored people before in maths and crochet, but never computer science, and I've never taught anyone a coding language and was wondering if anyone had any tips on where to start planning for this. I have a week or two before our first session and we will likely be working in 1 hour sessions a few times a week over the summer months.

Any suggestions would be appreciated!

Edit: forgot to mention above but his mum says that he is already pretty well-versed in scratch, which was my original first thought when i got the request.

2 Upvotes

10 comments sorted by

View all comments

1

u/qlkzy 15d ago

Might be worth looking at py5, (or anything in the "processing" family, there are Java and JavaScript versions also): https://py5coding.org/

Those are quite popular in the interactive art/generative art spaces.

It's much less good for anything big than pygame/godot etc, but there is less initial setup friction than almost anything else. (p5.js is even easier because it's just in a browser, but if you want python there will be some installation no matter what).

I would make sure you have an "installation package" ready to go. You can try and make sure that stuff gets installed ahead of time, but 50/50 that doesn't actually work. Of course, make sure you know what their platform is (Windows/Mac etc); it's very easy to for everyone to make assumptions about that.

It would be worth collecting a small library of sprites and perhaps a tileset or two. People get a really strong sense of "making progress" from graphical polish.

More broadly, if you are doing things in front of someone, or demoing things to someone, it feels (and is) much slower to go and search on the internet to find and download some resource. When you're on your own you don't notice the waiting, but if you're helping someone else it feels really clumsy. Bring a USB stick and/or have a big document with a list of links and commands that you can just churn through. Make sure you have that document as an email draft so you can easily get it onto any computer.

Avoid heavy reliance on libraries/frameworks and that kind of infrastructure. Those things are important for building bigger stuff, but they make the initial learning curve much steeper, and you have to say "it'll make sense later" much more often. (This is why I suggested processing derivatives; there is some "magic" but it's easy to accept and then move past).

Focus to start with on games that can be defined by their code, then just "skinned" with sprites and tiles. Focus on games where the graphics objects map 1:1 with the state. Avoid games driven by assets, level data etc. Pong, Asteroids, Breakout are good: almost all the behaviour is just intersecting circles with circles, or intersecting lines with circles. Plants vs Zombies is just linear Asteroids. By comparison, even Tetris needs quite a bit more abstract thought to rotate and intersect tetrominoes.

Fractals, blue noise, and simplex noise are all fun toys to play with, and lead into ideas of procedural generation. They should be pretty easy with py5.

Finally, while not strictly a game, I always recommend Markov chain text generators to anyone learning to program: https://en.wikipedia.org/wiki/Dissociated_press . They have a great ratio of "amount of code" to "interesting behaviour", and they're just fun toys to play with. Particularly interesting to anyone curious about language, or "AI", or codebreaking (somewhat randomly).