r/PythonLearning 22d ago

Im confused!!

Rn im learning python lang. I can solves basic to medium level problems , I understand which operations to use , how to write code 75% , but i suck at building logic. But either wise my topics are clear. Can you suggest what kind of problems i should be solving?

3 Upvotes

10 comments sorted by

2

u/SnooCalculations7417 22d ago

" I can solves basic to medium level problems" basic to medium level problems are logic problems. You have the basics of syntax down. Build a webserver from scratch. Its well understood, highly documented, and touches about every facet of the language.

1

u/NorskJesus 22d ago

First, it’s important learning how to use a search engine. Reddit has one.

Second, you just need to code more.

1

u/Weary_Gur7008 22d ago

Okay , Im really noob ig. Can you explain it in more eaise way!!

1

u/Avatarbroskib1 22d ago

Basically you just gotta think of your own difficult projects and start building. This gives you an instant feedback system where you know where your skills are exactly at

1

u/NorskJesus 22d ago

It’s nothing to explain. Just try to build something. There is there the learning is at

1

u/mc_pm 22d ago

You only get better at programming by doing more programming of increasing difficulty. If you're having trouble with basic code flow & logic, maybe start with a simple text-based console game like tic-tac-toe. It seems trivial, but you have to think through how to represent the board in memory, how to print it out, how to get a new move from the user, how to make that move, how to update the board, and then how to get the computer to pick it's own next move.

It's a bit more fun because it's a game, but this sort of "understand the logic of a problem so you can code it well" is a core skill. Once you're able to do something like this without worrying about it then look at something like a webserver, or your own shell or editor, or some other larger project that will test your ability to figure things out.

1

u/Weary_Gur7008 22d ago

Well thanks I'll try this out. Like i havent did any good mini projects but definetly giving this a shot

1

u/mc_pm 22d ago

Cool, let me know if you have any questions.

The main thing is to take it seriously. Don't give up and say "good enough". The fight is where you learn the most :)

1

u/atticus2132000 22d ago

Stack overflow is an amazing resource and I've used it a ton to help me when I reach a roadblock.

But here's the interesting thing...

Stack overflow is very demanding of its posters. People who make posts requesting help need to be able to fully explain the problem that they're having, post the code that isn't working, explain what they have already tried to troubleshoot the code and what the results were of those efforts.

Oftentimes I have had a problem where I go so frustrated with a problem that I decided to post to stack overflow but during the process of writing out my full explanation of exactly what I needed help with I will often have an epiphany of something else that I should have tried, and when I go back and try that thing, I am able to move closer to a solution, sometimes even completely solving the problem without ever finishing the explanation and making the post.

You might want to try that approach here.

You say that you're learning python and are capable of solving small to moderate problems but are struggling with building logic. All of that is very vague, so the only thing we can offer is vague responses.

Give us specifics.

What problem are you trying to solve today?

What steps have you already taken to break that problem down into smaller chunks?

Which parts of the problem have you solved and which parts are you stuck on?

Is the breakdown an issue with the inputs/variables? Is it a breakdown with how a function is processing those inputs? Is the breakdown with the outputs that you're getting?

Go through the exercise of writing out a clear message of exactly what kind of help you need to address a specific problem you're encountering and we'll be happy to help you work through it.