r/learnpython • • 15m ago

5 months into Python: stuck on problem solving and struggling to focus. How do I improve?

Hi everyone,

I've been learning Python for about 5 months. I know basics like data types, lists and classes, but I still can't solve problems on HackerRank. When I get a problem, my mind often goes blank. Sometimes I also struggle to understand the statement in English.

I spent the last 3 years consuming a lot of mindless social media content. Now I find it hard to focus and stay disciplined, and reading documentation or books feels difficult.

I'd like advice on:

  1. How can I build logical thinking and problem-solving skills?

  2. How do I get past the "blank mind" stage?

  3. How can I rebuild my focus and discipline?

  4. How can I get better at reading documentation and books?

If you've been through something similar, what actually worked for you?

Honest feedback is welcome. Thanks!

0 Upvotes

2 comments sorted by

•

u/True_Room3265 5m ago

Hey, buddy! 🥹

I think you might benefit from changing your approach a little. Instead of focusing primarily on HackerRank, why not try building a small Python project that solves a real problem you personally care about? 🙂

First, ask yourself:

"What is one repetitive, inconvenient, or frustrating problem in my daily life that I wish I could solve?"

It could be organizing files, tracking expenses, managing study schedules, or automating something you repeatedly do.

Once you've identified that problem, try this:

  1. Define the problem. What exactly needs solving? Who benefits from the solution?

  2. Break it into smaller tasks. Describe the steps in plain English or your native language before writing Python.

  3. Build a tiny MVP. Start with the simplest working version. Don't worry about fancy interfaces or advanced features.

  4. Learn concepts as you need them. If your project requires dictionaries, functions, file handling, or databases, study those concepts and immediately apply them.

  5. Test and improve. Try different inputs, investigate errors, and gradually add features.

This is also a practical way to develop logical thinking. You're repeatedly practicing how to decompose a larger problem into smaller, manageable steps.

For HackerRank, I'd suggest writing down the inputs, expected outputs, and a simple example before touching the keyboard. If the English wording is difficult, rewrite the problem in simpler language or translate it first. Understanding the requirements is part of solving the problem.

For focus, start with manageable 20–25-minute sessions. Put your phone away, work toward one specific objective, and take a short break. Gradually increase your reading and coding time rather than forcing yourself into marathon sessions.

For documentation, don't feel obligated to read entire manuals. Start with the section relevant to your current task, run the examples, modify them, and take short notes.

Most importantly, don't measure your progress only by how many HackerRank problems you solve.

Learning Python syntax and learning how to solve problems with Python are related, but different skills.

At five months, you have plenty of room to grow. Build something small, make mistakes, debug it, and improve it. Those experiences are valuable.

I'm curious: What's one real-life problem you'd genuinely enjoy solving with Python? Start there. 😊

•

u/Senior-Ad-6588 5m ago

Stop watching tutorials and start building stuff, start with basic games like number guesser, slot machine etc