HACKER Q&A
📣 fdeage

Teaching Python to 16 yo as their first PL. Fun projects to get started?


This year, I have a class of 12 kids in eleventh grade (in French, we call them "Première") to whom I'm supposed to teach this new "Numerical and Computer Science" class [0].

The program is actually pretty interesting (by school standards). The course used to be in Java, but switched to Python two years ago. It's intended for complete beginners and aims at explaining basic CS concepts through Python.

I'm supposed to give them both individual and small group assignments in Python. I found some stuff on the Internet of course, but do you recommend any website, resource, idea for young newcomers?

[0] https://eduscol.education.fr/cid144156/nsi-bac-2021.html


  👤 poplarstand Accepted Answer ✓
My younger brother is in the same age range. He was interested in programming, so I pointed him towards Automate the Boring Stuff with Python. He has done well since, with his latest project being a simple mouse-wiggler script that sets his status to "online" for his school's mandatory online attendance checks.

Looking back at the learning process, the most useful parts of Automate the Boring Stuff with Python were the mini-projects: web scraping, GUI automation, and other immediately visible tools that helped a student to build tangible things. Once he had those, my little brother could figure out his own projects, like automating redundant tasks in the video games he plays.

Conversely, the least useful part of the book was its fundamentals. In retrospect I should've started him on a different tool like Codecademy. The instantaneous "correct/incorrect" feedback was a better fit for clearing the initial hurdle in understanding syntax.


👤 saradhi
Automate the boring stuff is definitely great stuff; I started my web scraping through it. However, I feel it may be a little too much for the 12th grade; again, it may be just me, with very late into the programming interest. My experience when giving recommendations is not to make multiple things learn in parallel. It is always easier to start with a project which we routinely do. The idea is to be clear on the process and outcome, and then achieve it in a non-routine process, programming. The approach will help not easily give up the task, and also brings interest. So, maybe you to list out the tasks that the kids usually do or even ask to list down their favorite/routine tasks and guide them through the programmatic approach.

👤 t-vi
Given the societal impact, I think a simple recommender system would be really important. Recommender systems literally shape the world we see.

Poll anything they might have a preference on (and not all the same) - movies, music, internet celebrities or what not - and build a system that asks someone's opinion on 5 things and then outputs suggestions.

I don't think you need anything fancy, but just counting "same entries" in the preference matrix would work to get basic collaborative filtering. Depending on the depth allowed, you can cast that more mathematically and maybe even discuss the idea of rank 1 factorizations (i.e. assign each person / thing a vector and attempt to approximate the matrix entries as scalar products) or optimization of that stuff.

As outlook, you have word2vec that works similar but has the added complication of the matrix being huge. Use that for a information retrieval or toy chat bot or whatever.

I did teach this to non-experts, but not high school kids. I imagine it would work similarly. Unfortunately, I don't know of a website that covers this for school kids.


👤 giantg2
I like to see physical results.

I have a Pi Zero with an environment that can give you temp/pressure/etc and blink LEDs. I also have an automation hat that provides the ability to interface with stepper motors or other things. They use Python. There are quite a few projects related to these online, covering various domains and skill levels.


👤 tmaly
Take a look at using the microbit

https://microbit.org/get-started/user-guide/python/

Having a hands on project is pretty cool for kids.


👤 disown
> The course used to be in Java, but switched to Python two years ago.

Why? Are they all comfortable with the english language? Why not find a french language PL and teach them that?

https://en.wikipedia.org/wiki/Linotte

I'm guessing all the libraries, documentation, etc would be in french.

> It's intended for complete beginners and aims at explaining basic CS concepts through Python.

Why would you use a programming language to teach basic CS concepts? Also, does it have to be fun? Must we be having fun at all times?


👤 7373737373
Perhaps a simple website with flask: https://flask.palletsprojects.com/en/1.1.x/quickstart/

👤 camdencheek
My favorite project to give kids who are just dipping their toes in the water is a Madlib. It prompts you for the blank words, then prints out the complete story with the blanks filled.

👤 bitwize
Text adventure! Graphical adventure with PyGame! Program a robot! (My 11yo nephew has decided that his future career lies in programming Mars rovers.)

👤 tetris11
implement a casino game, roulette or blackjack or guess the weight of the pound cake

👤 beamatronic
A text based maze game ala Zork

👤 grafelic
A scientific calculator.

👤 brudgers
Why not ask the kids?