📢
8
c/coding-for-beginners•lee.dianalee.diana•1mo ago

Took me 4 tries but I finally got my first Python loop to work

I spent all Tuesday evening stuck on a while loop that just wouldn't stop running, and my cat started meowing from the bedroom like she was tired of hearing me sigh. After Googling the same error message for like the 10th time I realized I forgot to increment my counter variable inside the loop. Has anyone else had a moment where one tiny typo made you feel like you were losing your mind?
2 comments

Log in to join the discussion

Log In
2 Comments
susan_ward
susan_ward1mo agoMost Upvoted
Wow, that's one way to debug your code. Burnt plastic smell is definitely a new error message I haven't seen in any IDE before. Maybe your laptop was just trying to tell you it needed a break from that infinite loop. At least your power strip sacrificed itself for the greater good of computer science learning. Your roommate must have some interesting stories to tell about that dorm room.
8
adam_anderson6
Blew out a power strip in my dorm freshman year because I had a while(true) loop running on an old laptop and the fan just gave up. The smell of burnt plastic woke me up at 3am. My roommate thought I was trying to cook something. The computer still works somehow but the power strip definitely doesn't.
3