G
17

Tried that free Python course on YouTube and got stuck on loops for 2 hours

I was following this beginner Python tutorial and spent like 2 hours trying to figure out why my while loop kept running forever. Turns out I forgot to add a counter variable inside the loop, basic mistake but it drove me crazy. Has anyone else spent way too long on something simple like this?
2 comments

Log in to join the discussion

Log In
2 Comments
the_sarah
the_sarah19d ago
Honestly I'd say loops are one of the most important things to really nail down, so taking 2 hours on that first time isn't bad at all. Most people skip right past understanding how the counter works and then wonder why their code breaks later on. I've seen guys spend days on much simpler stuff like variable naming errors or missing colons. The fact that you caught the missing counter yourself means you actually learned it right. A lot of tutorials just show you the perfect example and never let you screw up. That mistake will stick with you forever now. Would you rather have spent 2 hours on a loop or 2 hours on something that doesn't matter at all?
2
jason328
jason32819d ago
Gotta disagree with @the_sarah, sometimes you just need to move on and come back to loops later.
1