How to Teach Python to Kids: A Complete Guide for Parents
Many families lose momentum after the first few lessons. That is not necessarily because a child cannot handle Python; often the plan asks for long sessions, passive video watching or a large finished project too soon. Short sessions, visible results and permission to break things give a beginner a more manageable starting point.
This guide is the version we wish we had found when we started. It covers what works at different ages, a twelve-week plan you can run at home, the habits that quietly make children quit, how the common tools compare, and how to tell a child who is stuck from a child who is thinking.
Three beliefs that waste the first month
"Start with a video course"
A video mostly teaches a child to watch. Programming is partly a physical skill, because fingers have to learn where brackets, quotes and colons live on the keyboard, and a child who watches forty minutes of explanation and types nothing has learned about programming rather than how to program. A good rule is no more than three minutes of explaining before the first line of code gets typed.
There is research behind this. A teaching approach called PRIMM, developed by Sue Sentance and colleagues and trialled with nearly five hundred students aged 11 to 14 across thirteen schools, starts every lesson by giving students a short working program and asking them to predict what it will do before they run it (Computer Science Education, 2019). The child is doing something with code from the first minute, rather than listening to someone talk about it.
"Blocks first, text much later"
Block-based tools like Scratch are excellent for learning sequences, events and loops, and they are genuinely the right place to start at six or seven. The research is reassuring here. When David Weintrop and Uri Wilensky followed high school students who began with either blocks or text and then moved on to Java, the students who started with text did not end up programming any better than those who started with blocks (Computers & Education, 2019). So blocks are not a waste of time.
What we do see is that children who stay in blocks for years can lose patience when they finally meet typed code, because blocks never ask them to spell anything exactly. Our suggestion is to give blocks a rough end date, perhaps a year or eighteen months, and then move on. A child who already understands loops and if in Scratch has the hard ideas in place, and only the spelling is new.
"Wait until they read really well"
Reading helps, but it works in both directions. Children who code often start reading more carefully, because a misplaced comma has a consequence they can see. What a child actually needs to begin is narrower than reading fluency. They should be able to follow a two-step instruction like "open the file, then press Run", find a bracket on the keyboard without hunting for ten seconds, and cope with being wrong without shutting down.
That last one matters more than the other two put together. If a child treats every error message as a judgement on how clever they are, no curriculum will survive. If that is where your child is, spend a little time on it first, perhaps by making mistakes yourself out loud and laughing about them.
What to do at each age
Ages three to five, cause and effect with no code
At this age the goal is not Python at all. It is the idea every programmer eventually believes, that I said it, and it happened. You can build that without a screen.
Try the robot game. Your child is a robot and you give commands like "walk forward, turn left, pick up the bear", which they carry out exactly. Then swap roles. When it is your turn to be the robot, misunderstand on purpose. If they say "go to the door", stand still and ask how many steps. Children find this hilarious, and they learn that instructions have to be precise, which is the single most important lesson in programming.
You can also ask them to draw the steps for brushing their teeth, one box per step, in order. That drawing is a program. Or show them anything with a rule, such as a toy that repeats a sound, and ask what will happen next. Predicting what a program will do is the heart of debugging.
If you do use a screen at this age, keep it to five minutes and sit together. You type, and your child decides what the computer says. That is a perfectly good way to start.
Ages six to eight, print, variables and a lot of laughing
This is the sweet spot for typed code, because a child can write one line and see the result straight away.
print("My monster is called Blaze")
That is a complete program, and it does something. From there, a good order is to print their own words, then use print with numbers so the computer becomes a calculator, then store something in a variable like name = "Blaze" and use it twice. After that comes asking the player a question with input(), then making a decision with if and else, and finally repeating something with a for loop instead of copying lines.
Twenty minutes three times a week is enough. Do not combine steps. Each session gets one idea, and the session ends when your child has made one thing work.
Ages nine to twelve, from lines of code to projects
By nine or ten, most children can manage a forty-minute session and, just as importantly, keep a project in their head across several days. This is when the goal changes from understanding a concept to finishing a thing.
Good first projects take one to three sessions each. A quiz that keeps score teaches lists, loops and comparisons in one go, and your child can test it on a brother or sister afterwards. A number guessing game with a limited number of tries teaches the while loop, and also teaches the useful lesson that a loop with no way out will run forever. A text adventure with three rooms is often the first program that feels bigger than the screen, because the program has to remember where the player is.
At this stage, error messages stop being scary and become part of the work. If you hear your child say "it says line 4, so the problem is probably around line 4", you have succeeded, whatever the program does.
A twelve-week plan you can run at home
This assumes three sessions a week of twenty to thirty minutes. Adjust the pace if you need to, but try to keep the order.
In weeks one and two, work on print and the difference between text and numbers. Your child makes a greeting with their name and a sum that the computer works out. Read the output aloud together and ask "is that what you expected?"
In weeks three and four, introduce variables. A name tag that changes, or an HP counter that goes up and down, works well. Before they press Run, ask them to predict what the value will be.
Weeks five and six bring in input and conditions, and the natural project is a quiz that says "correct" or "not quite". Play the quiz yourself and give a wrong answer on purpose to see what happens.
Weeks seven to nine are for for loops and range(). A times-table drill or a battle move that repeats three times are good projects. It is worth asking "how would you do this without a loop?" and letting them feel how tedious that would be.
Weeks ten and eleven introduce lists, perhaps a team roster or a quiz that picks its questions from a list. Ask them to add a fifth item by themselves.
In week twelve, they put it together into a small game that uses three of the earlier ideas. Your only job this week is to ask questions. Do not fix anything for them.
After each session, write one line in a notebook about what you built, what broke and what fixed it. Twelve weeks later that log will be the most honest record of progress you have, and far more meaningful than a certificate.
The habits that make children quit
The quickest way to end a child's interest is to fix their code for them. The moment a parent takes the keyboard, the child learns that errors are the grown-up's job. You may point at a line, and you may ask a question, but try very hard not to type.
Long sessions are the second problem. Forty-five minutes once a week teaches less than twenty minutes three times a week, and it starts to feel like school. Spreading practice out is one of the best-supported findings in learning research. A large review led by John Dunlosky rated it one of only two study techniques with high usefulness across ages and subjects (Psychological Science in the Public Interest, 2013).
Third, let your child choose the project. "Let's make a calculator" feels like homework. "Let's make the computer say something cheeky about your brother" is a program they will happily debug for an hour.
Fourth, do not correct style before the program works. Whether a variable is called x or monster_hp matters eventually, but whether the code runs is what matters now.
Finally, praise the effort rather than the result. "You got it right" rewards luck. "You found that missing bracket yourself" rewards exactly the behaviour that turns children into programmers.
Blocks, videos, books or a game?
Block-based tools such as Scratch are free and ideal for six to eight year olds meeting loops and events for the first time. Their weakness is that they never teach exact spelling, so the move to typed code needs planning.
Video courses cost anything from a few dollars to a couple of hundred, and they suit motivated teenagers who will pause the video and type along. For younger children, watching tends to feel like progress while very little typing actually happens.
Text tutorials and books are cheap or free and work well for children aged ten and up who already love reading. Their weakness is that there is no feedback. One typo and the session can grind to a halt with nobody there to help.
Game-based courses where children type real code suit six to twelve year olds who need a reason to press Run. They are narrower than a full course, so your child will still need projects of their own afterwards. They usually have a free tier and then a subscription.
None of these is a complete answer on its own. What works for most families is a game or tutorial for the daily habit, plus one real project each month, because finishing a project is what proves the learning has stuck.
Stuck, or thinking?
Parents tend to step in too early. If your child is quiet, looking at the screen and occasionally muttering, they are thinking. Wait at least two minutes before saying anything.
If they can tell you what they want but not how to do it, they are stuck on the idea. Ask them to explain the steps out loud in plain words, and the code often follows. If there is an error message they have not read, ask them to read the last line of it aloud. And if they are pushing the keyboard away, stop for the day. Nothing is gained by finishing a session your child resents.
The most useful sentence a parent can learn here is "what did you want it to do, and what did it do instead?" It works for a seven-year-old, and it works for professional developers too.
How much time it takes
Twenty to thirty minutes, three times a week, is a reasonable starting rhythm for about three months. Some children will move faster and others will need longer. After that, one project a month can provide a useful reason to keep practising. Consistency usually beats occasional long sessions, but the plan should follow the child rather than promise a fixed result.
Frequently asked questions
What age should a child start Python?
The useful threshold is not a single age but a few practical abilities: following a two-step instruction, finding brackets on a keyboard and tolerating being wrong. Children reach those points at different times. Younger children can start with cause-and-effect games and no typing at all.
Is Python too hard for a child?
The syntax is small, just brackets, quotes, colons and indentation, and the first results are immediate. What is hard is not Python but the debugging habit, which is why short sessions and visible output matter more than the language choice.
Should we start with Scratch instead?
Scratch is a good first tool at six or seven, but give it an expiry date. Once a child understands loops and conditions in blocks, moving to text teaches the same ideas again with stricter spelling. Children who stay in blocks for years often stall at nine or ten.
How long until a child can write a real program?
With three short sessions a week, a child may be ready to attempt a small text-based game, such as a quiz, a guessing game or a three-room adventure, after a few months. The result depends on age, prior experience, support and the amount of typing involved.
Do we need to install anything?
No. Python runs in a browser tab on any laptop, Chromebook or tablet with a keyboard. Avoiding installation removes the single biggest reason a first session fails.
What if the parent cannot code?
For the first three or four months you do not need to. Your job is to keep the rhythm, ask what was expected, and read the last line of the error message together. Explaining syntax is optional; protecting the habit is not.
Start with one session, not a curriculum
The plan above is a map, not a contract. Do one session this week: open a browser, type print("Hello"), change the word, ask the child to predict what happens. If that produces a laugh, you already have the hardest part, a reason to open the editor again tomorrow.
If you would rather start inside something built for the purpose, Code Monsters Academy covers the same sequence (print, variables, conditions, loops, lists and functions) as short levels inside a game, in the browser, with chapters 1 and 2 free to play without signing up and chapters 1–3 free once you log in.
Sources behind this guide: age readiness · screen time
Related: where to start · moving on from Scratch · the homeschool version of this plan · games to copy and paste