I'm learning Python and often understand lessons while watching them. I can follow what each line does and recognize why the solution works, but when I'm given a new problem and asked to write the code myself, my mind goes blank. I understand solutions after seeing them, yet struggle to create one independently, which makes me wonder whether I really know the material. Is this a normal stage of learning programming? What helped you move from recognizing code to writing it yourself—more exercises, small projects, rewriting examples from memory, pseudocode, or something else?
4 Answers
Try separating the programming problem into two parts: logic and syntax. First describe the solution in plain English, bullet points, a flowchart, or pseudocode. Break the task into tiny steps and solve one step at a time. Only after you know what the program should do should you worry about the exact Python syntax. Looking up syntax is fine—the important skill is learning how to plan the solution.
Avoid only watching tutorials, because that can create a false feeling of mastery. Pause before the instructor gives the solution and attempt the exercise yourself. Afterward, close the lesson and rebuild the example from a blank file. You can also modify working code, break it deliberately, and add a new feature. Getting stuck and debugging teaches more than simply following along.
Use a progression of tiny projects instead of jumping straight into large challenges. For example, write a program that prints a greeting, repeat it several times, accept a name, process multiple names, and then add validation or sorting. Each small extension gives you practice turning an idea into code while keeping the problem manageable. With enough repetition, the blank-page feeling becomes less intimidating.
Yes, this is completely normal. Understanding someone else’s solution is recognition, while creating your own solution requires recall, problem-solving, and practice. Those are related but different skills. The main way to improve is to write code regularly without immediately looking at a solution. Start with very small programs and gradually make them more complicated.

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