O
27

My nephew's question made me rethink how I teach loops

My 14 year old nephew asked me last weekend why we start counting at zero in Python. I gave him the standard explanation about indices and ranges, but he pushed back and asked if that actually helps beginners or just confuses them. He said the way I was explaining it made loops sound like math homework, not like something useful. That conversation made me realize I have been teaching syntax instead of problem solving. Has anyone else found a better way to explain loops to people who are brand new to coding?
1 comments

Log in to join the discussion

Log In
1 Comment
charlesanderson
Zero indexing is one of the few things in programming that actually makes sense once you stop treating it like counting. It's not about confusing beginners, it's about teaching them that loops are just a tool for stepping through a sequence, and the starting point is arbitrary anyway. Your nephew's complaint sounds less like a real problem with the concept and more like a kid who doesn't want to learn something that feels boring. If you sugarcoat everything into "useful stories" you end up with people who can follow a tutorial but freeze when they see a for loop in the wild. Keep it dry and precise, that's what actually sticks long term.
-2