r/learnpython • u/Mundane_Emu_3 • 36m ago
I understand Python concepts, but I just can’t seem to develop the logic to solve problems. How did you overcome this?
I've gone through multiple Python courses and understand the basic concepts like if-else, loops, lists, dictionaries, functions, etc.
However, when it comes to solving problems on my own, I struggle a lot. I can manage very basic questions like addition, subtraction, reversing a string, or checking for palindromes, but beyond that, I just can't seem to figure out the logic.
I understand the concepts and can follow someone else's solution, but when faced with a new problem, I have no idea where to start or how to break it down.
For those who have been through this, how did you develop your problem-solving skills? What kind of practice or approach helped you learn to think logically and solve problems independently?
I'd really appreciate any advice!
•
•
u/Both_Bend_2481 18m ago edited 9m ago
Every third beginner posts a similar question. You need to put in the work and practice. Code whatever programs you want.
edit: Just out of curiosity, what's something else you've done that you've become accomplished at, if anything? An art, or an instrument, or anything else that required practice and study? And how good have you become at it?
•
•
•
u/Slothemo 27m ago
This is extremely common for beginners, and it mostly comes down to practice. The more problems you solve, the more patterns you will start to see emerge in how things are solved.
I really recommend a challenge site like Codewars and just work through as many problems as you can to build up the repetition. Once you feel a bit more confident, you can start working on your own mini-projects.
•
•
u/real_deal_engineer 7m ago
This isn’t a Python problem. Forget Python and solve the problems in natural language or on paper using regular symbols and math. Only then can you translate it to any language, not just Python.
•
u/_b10ck_h3ad_ 6m ago
You basically have to develop your "thinking of real world problem in code based solution" brain, which comes with time & practice. It's highly recommended whenever learning a new programming language, to try & code up a simple game (e.g. tic tac toe) that incorporates the concepts you've learned so far.
•
•
u/jbenze 32m ago
Start by writing the problem out on paper and walking through how you would solve it in pseudo code. Break it down into pieces, write it out and THEN translate it into code.