7 ms·
Ask HN: 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
- beamatronic 6y agoA text based maze game ala Zork
- Lammy 6y agoCompare it to Minecraft, not Zork, if you want to capture current 16-year-olds’ attention :)
- tetris11 6y agoimplement a casino game, roulette or blackjack or guess the weight of the pound cake
- fdeage 6y agoVery nice idea!
- bitwize 6y agoText adventure! Graphical adventure with PyGame! Program a robot! (My 11yo nephew has decided that his future career lies in programming Mars rovers.)
- fdeage 6y agoText adventure could definitely work well! As soon as I talked about the input() function, they were kind of doing that already :)
- poplarstand 6y agoMy 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.
- brudgers 6y agoWhy not ask the kids?
- 2rsf 6y agoFrom my experience they don't know where to begin and would come up with suggestions that are way too complex and big
- saradhi 6y agoAutomate 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.
- disown 6y ago> 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?
- armatav 6y agoClearly you have not interacted with a kid who’s on the fence about programming. It’s a hard business, teaching someone super young that it’s really worth staring at a bunch of code blocks all day. It’s even harder to prove to them that not only is it useful, but it’s not boring. Kids need fun and exploration to pique their interest in a topic. No, it doesn’t have to be fun all the time, but good luck getting them started with “build me a calculator in C please”.
- fdeage 6y agoWell, 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.
- grafelic 6y agoA scientific calculator.
- fdeage 6y agoWhat 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?
- giantg2 6y agoI 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.
- camdencheek 6y agoMy 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.
- t-vi 6y agoGiven 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 6y agoThank 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!
- 7373737373 6y agoPerhaps a simple website with flask: https://flask.palletsprojects.com/en/1.1.x/quickstart/ https://flask.palletsprojects.com/en/1.1.x/quickstart/
- 2rsf 6y agoBut 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 6y ago"Hello World" in flask is barely more lines than "Hello World" in the console. If anything it's a good on-ramp for webdev.
- fdeage 6y agoI was considering Flask too... It introduces a lot of stuff and layers they won't understand at first, but getting their feet wet on web development would be very interesting.
- tmaly 6y agoTake 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 6y agoI'll have a look, thanks!