Stomping out of the swimming pool because learning to swim is too scary. Throwing the crayon down because writing is too hard. These are the times that try parents’ souls — those tearful and tempestuous moments when kids simply give up.

If these episodes are hard for parents to witness, consider how our children feel. They are trying something new and difficult and — in their minds — failing. In truth, this is an ideal teachable moment, when we can help our children understand that, no matter how new or difficult, challenges are achieved through patience, practice, and effort.

“Perseverance, or work ethic, is one of the most highly correlated traits of success,” says child educational consultant Michele Borba, the author of The Big Book of Parenting Solutions. Persistence is something children need to succeed in school and life. A 2007 paper from the Journal of Personality and Social Psychology found the ability to persevere may be as essential as talent or IQ to succeed. The good news? Persistence is a virtue that can be taught and learned. It’s just a matter of knowing how to help your children — and not giving up on them when they give up on themselves.

Talk about it

Young kids benefit from regularly hearing about persistence. So teach them different ways to talk about problem-solving: “I won’t quit,” “I can do it,” and “It’s always hardest the first time, but it will get easier.” Borba also suggests coming up with a household “stick with it” mantra, explaining that families that maintain an overall attitude of “We can do it” tend to face obstacles and mistakes with grace and ingenuity. Some favorites: “Mistakes don’t get us down” and “The family that doesn’t quit!” Finally, tell stories either from your own life or read to your child about succeeding despite the obstacles. The all-time “I can do it” early-reader classic? The Little Engine That Could.

Resist rescuing

When we see our kids having a hard time because they aren’t succeeding, it’s tempting to jump in to make it all better. But remember: We learn by trial and error. By giving kids a chance to fail, we also give them the pleasure of succeeding on their own. The next time your children have a problem and ask you to solve it, don’t. Instead, sit down and ask them to think of a solution. This gives your kids time to cool down and teaches valuable problem-solving skills. And while it’s tempting, when playing games — be it Candy Land or red light, green light — refrain from letting children win just because they’ll be unhappy if they don’t. Playing fair and square teaches the important life lesson that, in games as in life, sometimes you’re going to fail before you win.

Nurture a hobby

Children who have a passion learn the pleasure of practicing and improving at something they love, says Borba. Support your children’s interests. Help them check out books at the library on subjects they love. Not only are they learning firsthand the value of mastering something through effort, they may also be preparing for their adult vocation.

Watch out for the “I can’t do it” triggers

Do your kids seem to blow up at a certain time of day? Often, says Borba, children this age get frustrated and give up at a task simply because they are tired, hungry, or just need some time to unwind. So make sure your children are well fed, get enough sleep, and have a chance to play before facing the task at hand. By explaining that they’re strengthening their minds and bodies, young kids will learn to fortify themselves before turning to a challenge.

Remember: Young kids often blow up when they can’t get something right. Avoid recrimination (“I told you this would be hard”) or reacting with your own, sometimes justifiable, anger (“Don’t yell at me just because you can’t do the puzzle!”). If you lose your cool, walk away for a moment. Also, suggest your children take a break — running around the house to “get the angries out” — then return after calming down.

Remind them of their successes

“I’ll never be able to do it!” Chances are you’ve heard your children utter this mournful cry of defeat. At times like these, make kids the hero of a story. Remind them of the triumphal times they had trouble doing well at something but kept their eyes on the goal and succeeded. “Remember when you were scared of starting preschool, but went anyway and ended up loving it and making good friends?” This kind of pep talk is often just what kids need to try, try again. And when your children hang in there, point it out. “You kept writing those numbers even though it was hard. You should be really proud.”