Show HN: PyKidos, Teach Your Kid Python in the Browser
pykidos.github.io
pykidos.github.io
My new year's resolution has been to learn Python (I'm a JS / nodeJS dev), and have been studying on and off the past few months.
Biggest hurdle for me has been:
- Understanding venvs. Why can't it just be like how node works? I get you need the venv so you don't use some wrong python version or install stuff into system python global space
- Package management (still struggling with this - for example, downgrading packages seems to be a huge pain compared to node)
- General ecosystem. If I want to trend towards AI / ML, do I need to learn pandas first, then get into jupyter notebooks, etc? Fortunately my work has an education stipend and I've bought lots of books, online courses (datacamp, realpython, manning books), etc, but I haven't found anything that felt "structured" in terms of just getting enough to know to hit the ground running in a productive way. I'm constantly re-arranging my internal course plan.
- Version sensitivity. I'm used to semver conventions from JS, and python and its package ecosystem doesn't seem to practice this at all. It's really strange from my perspective that one package / project only works with python 3.7 but not 3.6 for example, or when a popular package is still stuck on a 0.x.y version
I tried several existing apps but couldn't find one that met all my criteria:
- Fully browser-based, no need to install anything
- Supports Python
- Open-source and customizable
- Simple UI/UX
- Includes simple graphical elements like a grid (my kid thought my plain IPython terminal was too "boring")
So I just built my own.
PyKidos provides a playground where you can introduce various programming and math concepts to your child, such as:
- Variables
- Basic mathematical operations
- Loops
- Conditional statements
- Modular arithmetic
- Vectors
- Functions
- Coordinate systems
- Color systems
- Trigonometric functions
- Matrices
- And more.
Features:
- Completely client-side: data is stored only in your browser (localStorage).
- Utilizes Pyodide [2], a CPython port to WebAssembly, with support for NumPy and other scientific libraries.
- Includes a Unicode emoji picker and color picker.
- Allows manipulation of a grid (cell colors and text, including Unicode emojis) using Python.
- Reacts to click and keyboard events within the grid.
- Supports animations.
- Enables local download of your Python scripts.
- Facilitates code sharing through a URL containing the entire code and data.
PyKidos is still quite rough around the edges since I primarily built it for my own needs, but I hope it proves helpful to others. In particular, I didn't take the time to ensure it runs smoothly on mobile devices, different browsers, or operating systems.
Feel free to report issues, ask questions, offer suggestions, or submit pull requests.
Did you check out sites like python-tutor.com (sp?), repl.it, PythonAnywhere, etc.? I don’t mean for feature parity, but just to get feature and flow ideas. There are more like those that I don't remember right now.
There's a generation of us that got started with QBASIC at 8 years old, which did significantly less hand-holding than this.
It's available in German (and maybe other languages), too.
If you’re interested in teaching kids Python, also take a look at Hedy. It’s a gradual language that exposed more programming paradigms with each level. It’s used a lot in classroom settings.
Full disclosure: I’ve contributed a couple of commits.
She gave a wonderful talk at Splash 2023 on Hedy, I'll see if I can find it. *edit, I don't think it was recorded but I found these two which will do
Hedy: Creating a Programming Language for EveryoneFelienne Hermans • YOW! 2023 https://www.youtube.com/watch?v=j4eSjA6btE8
"Hedy: A Gradual programming language" by Felienne Hermans (Strange Loop 2022) https://www.youtube.com/watch?v=fmF7HpU_-9k
I posted it here for HNers to comment on, if they wish:
As a French, language is an additional barrier and I implemented some facilities in PyKidos to allow for translations of built-in global variables and functions (color names etc). But the Python keywords are still in English. Happy to see that Hedy supports full localization.
Using chrome
I teach my daughter things from small circuits to assembler, c, python, sql but also basic prompt engineering, how next word predictors work, how surveillance works or how privacy is infringed, how do we pay for the "free" apps, or how to make an idea into something real, also things about how to type fast (at the moment she types with 80wpm) and how to not be afraid of computers and how to just play with them.
Of course, it might turn out that I have wasted her time, but we spend time together, and during this time I also teach her how to learn things.
Honestly I am not sure "what" you are teaching is that important, If I knew how to bake, I would teach her the deep mastery of baking with all my heart.
PS: you can check my teaching progress log here https://github.com/jackdoe/programming-for-kids/blob/master/...
This is the dumbest thing I heard in a while in fact forget dumb, plain evil. Dr-Evil level of wicked.
Turn the kids you don't have into brainwashed idiots that don't know.
Jeez. Donwvote hard!
You have to request a 'mentor' account (or if they're homeschooled you can request a teacher account). The CS1 curriculum is aimed a little older - high school students - but, from experience, a bright elementary school student can start it, though it may drag a little (the starting lessons are designed to be quick for older students).