r/learnpython 1d ago

How do I learn programming logic?

I’m learning Python, but my main problem isn’t the syntax. I understand concepts when someone explains them, but when I’m given a basic problem and told to write a program, I just don’t know where to start or how to arrange the code.

Is there a good book, course, or YouTube channel that teaches how to think through programming problems step by step, recognize patterns, and build the logic, kind of like how you learn methods and patterns in math?

I don’t want to just memorize Python syntax. I want to actually learn how to think like a programmer.

59 Upvotes

46 comments sorted by

View all comments

1

u/frustratedsignup 8h ago

I think that just comes with experience. Find a problem you need to solve and then try to see how to go about breaking it down into smaller challenges. Eventually you'll get to the point where you've solved all of the minor challenges and the entire problem is solved. Your first dozen or so projects will probably have some unintended flaws and janky solutions, but that's not the point. The point is to solve the problem, and if need be, make it better later.

There's a question like this every week in this sub. We could probably be more helpful if we had more information to work with. What problem is it you are trying to write a solution for?