When my older daughter was young and still taking piano lessons, I’d half-listen from the second floor while she practiced down below.

Typically, she’d get pretty good at the opening measures of a new piece. But eventually she’d get to a part she didn’t know as well. At that point, music became noise.

Involuntarily, as she clawed her way through the rough bits, I winced and cringed. And I bet she did, too, particularly because trying things we can’t yet do is especially effortful.

Very soon, there would be a pause. And then she would begin again at the beginning — where she felt comfortable, where it was easy, where the touch of her fingers generated music instead of noise.

If I noticed that she had spent too much time repeating the fluid measures and not enough on what was obviously difficult for her, I’d go downstairs and, as gently as I could, prompt her to get back to the hard stuff.

Why do kids need grownups who love them to encourage them through what cognitive scientists call “desirable difficulty”?

A new study published in the journal Cognitive Psychology shows that students often misinterpret the feeling of “This is hard!” to mean “I must not be learning much!”

However, the truth is that more effortful strategies, like quizzing yourself rather than just rereading notes, produce greater long-term learning gains. Difficulty is desirable … but it’s not always desired.

Don’t assume that kids avoid effort because they’re lazy. Instead, they might be misreading the sensation of effort as a signal that they’re failing to make progress.

Do teach the young people in your life that learning often requires struggle. Share stories of times you, too, felt confused and frustrated, and how persisting through difficulty helped you improve more than sticking to what you already knew.

And, when their practice sounds and looks truly awful, tell them that the sound of struggle is music to your ears.

Angela Duckworth is cofounder and CEO of Character Lab and a psychology professor at the University of Pennsylvania. You can sign up to receive her Tip of the Week — actionable advice about the science of character — at characterlab.org.