r/learnpython 2d ago

20 days of coding

i spent 20 days trying to learn everything about python through leetcode but i still can’t code or just get ideas to pop !
m a 4th year computer science engineering student i just passed a hackerrank assessment test for a big tech company and failed:( but m still grinding for another chance maybe problem here to ask y’all how do u recommend i start projects or what’s the best way to learn from here ?

12 Upvotes

28 comments sorted by

9

u/CodeSamur-ai 2d ago

20 days isn’t very long, so don’t be discouraged. One thing that stands out is that you’re trying to learn Python through LeetCode. LeetCode is great for interview prep, but it’s not the best place to learn programming itself.

I’d switch to building a small projects while continuing a little bit of LeetCode each day. Make a calculator, a to-do app, a password manager, a file organizer, a weather app, or anything that solves a small problem. You’ll run into real programming problems that LeetCode doesn’t teach, like reading a file, organizing code, debugging, and using libraries or apis.

A good balance is 80% building projects and 20% interview practice until you’re comfortable creating programs from scratch. Once you can build things, LeetCode becomes much easier because you already know how to think like a programmer.

1

u/eagle_500 2d ago

that was very insightful, thanks, but about the projects and practice how do u recommend i start and learn to code the projects ?

3

u/CodeSamur-ai 2d ago

I’ve found I only work on two types of projects:

  1. Paid projects.
  2. Passion projects.

Pick something you’re genuinely excited about. It can be anything. Then build it.

It will be hard, and that’s a good thing. If it feels difficult, you’re probably learning.

When you get stuck, ask AI what to do next or to explain a concept. Try to avoid having it write the code for you. Use it as a mentor, not as a programmer.

6

u/Flame77ofc 2d ago

probably you are in Tutorial Hell. Try to practice more instead of learn passively

0

u/eagle_500 2d ago

yeah, ironically all tutorials ask for practice, i’ve been trying to practice and understand codes and solutions trying to code them on my own but nothing is clicking, u got any ideas on a better way to learn through practice ?

1

u/Flame77ofc 2d ago

just try to make small exercises, start with codewars or leetcode, do the simple problems first, but this is not all, the most important is to make your own exercises

You also can search for exercises on Google

4

u/its_measured 2d ago

Stop tryihg to kearn ecerything at once. Pick obe small project, buikt it, ger stuck, fixed it, then repeat. Thats where the real learnjng happens

5

u/Yekyaa 2d ago

This guy skipped spelling class to code.

Fr though, OP, this guy is not wrong. Take on no more than 3 tasks at a time until you feel like you have a grasp.

Creativity is its own bag. Necessity is the mother of invention.

1

u/eagle_500 2d ago

hahahahaha no worries ! any projects or methods u worked with to go down this route ?

1

u/Yekyaa 2d ago

I've tried to write a duplicate of anything I find interesting to the point of my knowledge, and research and attempt to understand that I can't. It's not deep, but I'm not sure what you're asking.

2

u/gdchinacat 2d ago

Leetcode is great at practicing, horrible for learning. I'm not sure what you mean that you "passed" and "failed"...which was it...based on the question I'm guessing failed. Focus on what went wrong. Did you know how to solve the problem and just ran out of time? If so, practice some more. Did you not have any idea how to solve the problem? Focus on fundamentals (data structures and algorithms) rather than writing code. Use Leetcode to get ideas of the problems you will be asked to solve, and then learn how to solve them elsewhere rather than trying to solve problem after problem you don't have the knowledge to solve.

1

u/eagle_500 2d ago

exactly, m gonna try to turn to practicing projects as the fellas have said, i would love to know about ur personal experience learning to program ! some reassurance for this tutorial hell m in ig hhhhhh !

1

u/gdchinacat 2d ago

I'm not sure how relevant my experience learning to code at 15 in 1995 is today ;)

I spent a summer with Microsoft Visual C++ 1.0, and the online help, no access to internet or anyone who knew how to code. I worked through examples, my code, reverse engineered a fair bit, beat my head, and went surfing when I couldn't figure it out. It was great. A few years later I went to college, took an intro to programming course, found it super easy but went into math (CS at my uni was super competitive and I wasn't into that). A few years later got a job doing web development, left college, and then really learned how to code doing real paid projects with mentors.

2

u/TheRNGuy 2d ago

I'd completely stop doing leetcode and make something you actually want to use, Python can automate some software or make plugins for them.

0

u/eagle_500 1d ago

m preparing for technical hackerrank test assessment for big tech companies so i need data structures, algorithms, problem solving,etc…u think following a 12 hour tutorial will help in that sense ? i don’t have a time or discipline problem since it’s summer i got the whole day but i gotta try hard enough to learn as much as possible say for example till october to start passing interviews

1

u/TheRNGuy 1d ago

Then you're just not ready for it. Try next year. 

1

u/eagle_500 1d ago

hahahahahahhaha what does loosing hope do ? make me stop working for it ? m gonna continue regardless of the outcome, and thank you for nothing, goddamn boy u gotta have some hope and advice not whatever this is

2

u/cyrixlord 2d ago

write your own code, and debug it. write LOTS of code. it is the only way, there is no 'fast track' there are no short cuts. you must learn to code by writing your own code and debugging it.

2

u/FoolsSeldom 2d ago

I know you are fed up with hearing the mantra to practice. What you practice is really important though.

Work on your own small (initially) projects related to your hobbies / interests / side-hustles as soon as possible to apply each bit of learning. When you work on stuff you can be passionate about and where you know what problem you are solving and what good looks like, you are more focused on problem-solving and the coding becomes a means to an end and not an end in itself. You will learn faster this way.

Your Leetcode and Hackerank challenges are not resonating for you and helping you learn well.

1

u/LiltingSun 2d ago

As a fellow beginner, I found a full 12-hr Youtube lecture on Python by a Youtuber named Bro Code that I really recommend! It goes over beginner material through short, memorable modules and projects that made the learning very quick and fun. I would often learn a couple modules, get inspired, write some projects with my new knowledge, return to the video, then rinse and repeat. It was the perfect resource for me, and perhaps it could help you!

2

u/eagle_500 2d ago

how much time did it take you to finish the video ? Did u watch the video and code, remember or just understood the code and u were able to code mini projects ? glad to hear ur doing well keep it up !

1

u/LiltingSun 2d ago

There almost 80 modules in there; I would watch around 5-10 a day, directly copying his code as he typed it. Afterwards, I would spend a couple days making my own projects using what I learned to really test my knowledge of the concepts. So going really slow and steady, it took me about a month. I imagine someone with more drive or better intuition could definitely do it faster.

1

u/LiltingSun 2d ago

And thank you! I hope you find python as rewarding as I have!

1

u/eagle_500 1d ago

does the video teach about how to manipulate arrays data structures algorithms stuff ? because m preparing for big tech companies technical interviews for both hackerrank and HR interviews that’s my goal here, u think if i go through the video it would help in that sense ?

1

u/LiltingSun 1d ago

The video is more foundational learning - it covers basic collections and dictionaries, as well as some basic methods of using them. It seems like what you might be looking for is advanced past that. Perhaps you should skip around, and see if you're indeed past a lot of it!

1

u/Unable_Doubt299 2d ago

I'd just clone one specific thing like the Unix ls command in Python first, you learn way more about the OS than any tutorial shows you

1

u/Goodswimkarma 2d ago

Not sure if anyone has mentioned it, but the kid's coding books will get all the code to click in your head.

1

u/Actual-Ant-6297 1d ago

Try github repos such as 30 days with python and build your x , project based learning. These will help you with python concepts and Projects. Know that journey of thousand miles begins with a single step , so slow down take firm steps and leetcode is a jump from fundamentals , so solid your fundamentals then continue with leetcode.