Finally Got My Python Loop Right After 3 Days at the Library
I was stuck on this for loop exercise for 3 days straight at the downtown library on 5th. Kept getting an index error and couldn't figure out why. A retired guy named Hank sitting at the next computer looked over and said my range was off by one. Changed `range(len(nums))` to `range(len(nums)-1)` and it worked on the first run. Now I actually get why off-by-one errors are such a big deal. What was your first "it finally works" moment?
My first win was a while loop that counted down from 10 and I felt like a genius for about 5 minutes until I ran it again and it printed forever because I forgot to subtract from the counter. The thing ran so long my laptop fan sounded like a jet and I had to force shut it down lol. Hank sounds like a real one by the way, those library regulars always spot the bug in like 2 seconds. Funny part is I still mess up range sometimes even after years of this. Half the battle is just knowing that the computer does exactly what you tell it, even when what you told it was dumb.