×
all 21 comments

[–]schoolmonky 9 points10 points  (1 child)

Pick a smaller problem. Bonus points if the smaller problem you pick is a small part of the problem you started with.

Really all "problem solving" is is breaking down big problems into small ones, recursively if necessary, until the small problems are small enough that they are easy to solve, and then building those small solutions back up into a solution of the whole thing.

[–]Omm_Imp 1 point2 points  (2 children)

I’m taking a Python class in college right now and feel the same way. Mostly I’m frustrated because the lab assignments seem to require a lot of knowledge beyond the assigned readings and what is discussed in class. I end up asking for help here or googling for answers. And the solutions are far more complex than anything we have seen in class. This is just bad pedagogy. The instructor is failing to scaffold knowledge in a way that stretches students without discouraging them.

Think about learning how to write a novel. You would be hard pressed to find a published author who has not read thousands of books, not to mention articles, emails, letters, etc. I think as beginners we probably need a lot more exposure to OTHER PEOPLE solving problems in Python before being expected to come up with solutions on our own. Obviously, that doesn’t preclude daily practice and challenge, but I think a lot of us get thrown into the deep end of the pool while we are still blowing up our floaties.

[–]MalibuBon 1 point2 points  (0 children)

Try to find a book that explains it on a middle school level, or even a kid's level, or an online video. The exercises might seem silly, but it helped me learning basic computer programming back in the day.

I also wrote easy programs on my own, which allowed me to check the answers to my math class. I enjoyed small study groups or even studying with one other person. They might be able to help you understand concepts you need help with, and vice versa.

More from r/learnpython

  Hide

Comments, continued...

[–]codeguru42 1 point2 points  (0 children)

Describe a solution in words. Describe each step in excruciating detail. Then go back and add more detail to each step. Then try to translate the steps into Python code. If you get stuck during the translation, go back and add more detail to your English description. As you do this more and more, it will become second nature and you will start doing it in your head.

[–]AlexMTBDude -1 points0 points  (9 children)

Do you think that there are problem solving skills that are specific to learning Python or is it the same for any new tech that you're trying to learn?

[–]Capable-Education255[S] 1 point2 points  (3 children)

Actually, I am an MBA graduate currently working in an contract role. I would like to learn python and switch in to permanent role. I am not from coding background

[–]AlexMTBDude 0 points1 point  (2 children)

Sure, but you describe a situation that will occur with anything new that you want to learn. If you have an MBA you should have been in this situation many times before. This is r/python so you should ask Python specific questions here.

[–]Capable-Education255[S] 0 points1 point  (1 child)

The question I raised about is Python right?

[–]AlexMTBDude 0 points1 point  (0 children)

Look at the answers that you have received; not one of them is Python specific. They're as generic as your post is.

[–]codeguru42 1 point2 points  (3 children)

There are definitely skills that are specific to Python. But the majority are applicable to many other languages, too.

[–]AlexMTBDude 0 points1 point  (2 children)

Is there anything in OP's post that is specific to Python?

[–]codeguru42 0 points1 point  (0 children)

I don't understand your follow up question. The OP starts his post with "I've been learning Python". That sound specific to python to me.

[–]codeguru42 0 points1 point  (0 children)

I guess I misunderstood your first question. I thought it was in a thread and you were genuinely asking? But maybe you are suing rhetorically instead.

[–]gdchinacat 0 points1 point  (0 children)

Yes and no. Where languages start being markedly better than others at specific types of problems is when the problem increases in complexity. Languages can be better or worse at managing specific types of complexity. For example, asynchronous IO can be done in both C and python. C doesn't have a mechanism to manage the complexity of async io...you end up with a lot of disjointed code that has to be stitched together in some way. Python (and other languages) has a more synchonous way of managing asynchronous code that keeps the steps of the async code sequential (with the complexity hidden away in the asyncio library and python interpreter).

For simple(ish) self contained algorithms (think sort, search, etc) the algorithms are pretty much independent of language...a n log(n) algorithm is an n log(n) algorithm regardless of language and the problem is identifying the algorithm (do you do a linear search or binary search). Of course some languages make it easier than others (some support recursive algorithms much better than others), but at the core they all do the same thing. But when you go to write the code to do that some languages are certainly better than others in how you implement that same algorithm. You still have to decide what algorithm or algorithms best solve the problem. Then when you implement that algorithm language certainly matters in whether you use a stack or recursion, use a builtin/standard library rather than roll your own, and how readable and comprehensible it is (optimizations often times make code nearly indecipherable).

So, language choice absolutely plays a role, but you still have to break the problem down which often times doesn't really matter which language you use (but may).

Good question, unfortunately the answer is yes, maybe, not really depending on the specific problem).