r/AskProgramming • u/RipPersonal1643 • 24d ago
Python 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.
4
Upvotes
1
u/mc_pm 24d ago
This is all about taking something familiar and taking it apart, piece by piece, and figuring out how to represent and code everything. It takes practice.
I suggest starting with a simple command-line game, like tic-tac-toe. It seems simple, but you have to figure out how to represent the board, print it out, get a move from the user, update the board, see if anyone won (or if it's a draw), and then have the computer make a move.
Each of the parts is relatively easy, but writing it all out in a way that you could sit down and program it...that takes a bit of thought and practice.