
Ask HN: Teaching Python to 16 yo as their first PL. Fun projects to get started? - fdeage
This year, I have a class of 12 kids in eleventh grade (in French, we call them &quot;Première&quot;) to whom I&#x27;m supposed to teach this new &quot;Numerical and Computer Science&quot; class [0].<p>The program is actually pretty interesting (by school standards). The course used to be in Java, but switched to Python two years ago. It&#x27;s intended for complete beginners and aims at explaining basic CS concepts through Python.<p>I&#x27;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?<p>[0] https:&#x2F;&#x2F;eduscol.education.fr&#x2F;cid144156&#x2F;nsi-bac-2021.html
======
poplarstand
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.

~~~
fdeage
Thank you for your reply. I had never thought about that, and never done it
myself, but it definitely sounds doable as a final group project!

------
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/](https://microbit.org/get-started/user-guide/python/)

Having a hands on project is pretty cool for kids.

~~~
fdeage
I'll have a look, thanks!

------
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](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?

~~~
fdeage
Well, it doesn't _have_ to, but fun is surely easier! Also, I'm sure there are
PL in French but they are a niche, which means less choices, less examples,
etc. Plus, it isn't that much of a barrier in Python. In the end, it's easier
to find French documentation for an english PL than find a French PL.

------
7373737373
Perhaps a simple website with flask:
[https://flask.palletsprojects.com/en/1.1.x/quickstart/](https://flask.palletsprojects.com/en/1.1.x/quickstart/)

~~~
2rsf
But that requires a bit more knowledge beyond just Python, it is not
necessarily bad and they can learn a lot from it but it might be to complex.

~~~
Doxin
"Hello World" in flask is barely more lines than "Hello World" in the console.
If anything it's a good on-ramp for webdev.

------
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.)

~~~
fdeage
Text adventure could definitely work well! As soon as I talked about the
input() function, they were kind of doing that already :)

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

~~~
fdeage
Very nice idea!

------
beamatronic
A text based maze game ala Zork

~~~
Lammy
Compare it to Minecraft, not Zork, if you want to capture current 16-year-
olds’ attention :)

------
grafelic
A scientific calculator.

~~~
fdeage
What functionalities are you thinking about? Proper float handling to prevent
the '0.1 + 0.2 = 0.30000000004' bug? Manual computation of square roots/sinus
functions?

------
brudgers
Why not ask the kids?

~~~
2rsf
From my experience they don't know where to begin and would come up with
suggestions that are way too complex and big

~~~
fdeage
I agree. However, showing them different projects and ask to pick some of them
could work well.

