As a beginner in programming, I've been learning the basics of loops, data types, and data structures, and up until now, I've managed to solve simple problems efficiently. However, I've been stuck on exercise #10 from a coding practice site for about four days now, which has been really frustrating, especially since I completed the previous nine exercises in under 30 minutes each. I'm worried that my persistence is becoming counter-productive. At what point should I consider looking up the solution? I want to develop strong problem-solving skills, but I feel like I'm not making any progress and that's bothering me.
5 Answers
You should consider looking up the solution if you're completely out of ideas. If you feel like you're making no progress, it's okay to peek! Just make sure you analyze the solution afterward to understand it, as that's where real learning happens.
I think it depends on how much progress you feel you're making. For me, if I'm stuck for more than a couple of hours, I usually start researching or looking for hints. Sometimes solutions feel elusive until you take a step back, and it helps to break the problem down into smaller pieces instead.
Honestly, if you've been stuck for more than a day, it's usually a good idea to step back and revisit later. Sometimes taking a break or doing something else will lead to that 'aha!' moment. I've had times where I spent ages on a problem only to find it was simple once I took a breather. Don't be too hard on yourself; this happens to everyone!
If you're getting frustrated, it's probably time to check out the provided templates or hints. Often, the answer lies in understanding the structure of the problem better. Don't forget that programming is all about breaking down problems and step-by-step solutions!
If you're struggling more than a day, don't hesitate to look for guidance. It's better to learn from the solution than to waste time feeling stuck. Each problem you solve will build your understanding, so it's about progress, not just sticking it out blindly.

Related Questions
How To: Running Codex CLI on Windows with Azure OpenAI
Set Wordpress Featured Image Using Javascript
How To Fix PHP Random Being The Same
Why no WebP Support with Wordpress
Replace Wordpress Cron With Linux Cron
Customize Yoast Canonical URL Programmatically