My Child Says "I'm Bad at Coding." What Should I Do?
One real error message, and the sixty seconds after it. What to say, what not to say, and why this subject bruises confidence faster than maths.

In this article
A father sent us a message that we have thought about a lot since. His daughter, ten, had shut the laptop and announced she was bad at coding and would like to stop now. He wanted to know whether to push or to let it go.
Neither, as it turned out. What she needed was for somebody to look at the screen.
Because when a child says they are bad at coding, they are almost never reporting a considered judgement about their abilities. They are reporting the last ninety seconds of their life, and those ninety seconds usually contain one specific thing that went wrong in a way that felt personal.
This post is about that specific thing, because the generic advice about praising effort does not survive contact with an actual error message.
The message that starts it
Here is what she was looking at. It is worth reading even if you have never written a line of code, because the shape of it is the whole problem.
She had written a guessing game. Four lines. It had worked in her head.
secret = 7
guess = int(input("Guess: "))
if guess == secret:
print("You win!")What the computer said back
When she ran it, Python answered with this:
IndentationError: expected an indented block after 'if' statement on line 3
Read that the way a ten-year-old reads it. There is a word she does not know, in capitals, with the word Error attached to it. There is a line number, which feels like being told which question she got wrong. And there is no hint whatsoever that the fix is four spaces.
The program was correct in every way that she cared about. The logic was right. The idea was right. She had understood the whole thing. What was missing was a gap at the start of one line, and the machine responded to that with a word that sounds like a school report.
This is the actual origin of most "I'm bad at coding" moments. Not a failure of understanding. A failure that is dressed up to look like one.
An error message is a location, not a verdict. Children read it as a verdict every single time until somebody tells them otherwise.
The sixty seconds after
What you do next matters more than anything you could say about persistence in general, and the useful move is smaller than most parents expect.
Do not say well done for trying. She knows the program does not run, and praise in the face of a broken thing reads as pity.
Do not fix it either, even if you can see it. The fix is the reward, and handing it over takes the only good part.
Say where. "It is telling you something about line three. What is on line three?" That is it. That sentence works whether or not you understand Python, because the error message already contains the answer and your child can read.
Then let the silence sit. She will look at line three, see the if, look at line four, and something will click about the gap. When it does, she fixes it herself, and what she learns is not about indentation. She learns that broken is a place you pass through.
Why this bruises faster than a wrong sum
There is a real reason coding knocks confidence harder than a wrong sum does, and it is worth naming so you can say it out loud to your child.
A wrong answer in maths is quiet. It sits on the page and waits for a teacher. A wrong program is loud, immediate, and public: it refuses, in capital letters, in front of you, the instant you ask. Fifty times an hour if it is a bad hour.
Nobody warns children that the failure rate is supposed to be that high. So a child running twenty failed attempts in an afternoon concludes something reasonable and completely wrong, which is that twenty failures means they are bad at this. Professionals fail at roughly the same rate. They have simply stopped counting it as failure.
For a child in a blocks class, the same sentence comes out for a different reason, and it needs a different answer. Their program runs perfectly and looks nothing like the thing they imagined. The sprite moves, just not the way it moved in their head. That is not a bug, that is the gap between an idea and a first draft, and every writer and painter you have ever admired lives in that gap permanently.
Reading and fixing broken things is not the boring part of this skill. It is the part that stays valuable, which we set out in what is left for your child to learn.
Here is her program after the four spaces went in, with one line added so that it says something either way. It is a very small change. It also took her from bad at coding to wanting to show her brother, in about four minutes.
secret = 7
guess = int(input("Guess: "))
if guess == secret:
print("You win!")
else:
print("Not this time. Try again!")What you can do this week
The aim is not to make your child confident. Confidence built on things going well collapses the moment they stop.
The aim is a child who expects things to break, which is a much sturdier thing to stand on.
- Ask your child to show you the last error message they got, not the last thing they built. Treat it as interesting rather than as a problem.
- Tell them a number: professionals get errors dozens of times a day. Children genuinely do not know this and it lands hard.
- When they are stuck, read the line number out loud and then say nothing at all for thirty seconds.
Final thought
That father did not push and did not let it go. He sat down, asked what line three said, and then kept quiet, which he reports was the difficult part.
His daughter is still going. What changed was not her ability, which was never the issue, but her reading of what a red message means. It stopped being a report card and became a signpost, and those are very different things to be handed by a machine forty times an afternoon.
If you want to know what to ask on a normal day rather than a bad one, we listed the questions in you don't need to know Python to support a child learning it. And if you are trying to work out whether the frustration is a sign of real difficulty or ordinary friction, the markers are in how do I know my child is actually learning to code.
If your child has already decided they are bad at this, a free trial class with a different teacher is a cheap way to test that belief. One hour, no card needed. They are usually wrong, and it is better if somebody other than a parent proves it.


