My first Python loop ran forever and froze my laptop at the Billerica library
Last Tuesday I was at the library in Billerica working through a while loop exercise from a free course, and I typed my counter update in the wrong spot so the loop just kept going. The screen locked up and I had to hold the power button down to get out, and I lost about 40 minutes of typing. A guy at the next table peeked over and pointed out my variable wasn't changing, so I added a print line inside the loop to watch the number. Now I always print the counter on big loops before running them, but I'm still scared of while loops. What's your go-to trick for catching an infinite loop before it eats your work?