
Inside the Coding Classroom
Chapter 1
First Steps with Code
Wanda Stanley
hi sam, sorry i am late
Sam Quinn
no worries wanda. Alright, before we start coding today, I want to introduce a concept that we’ll use very often it’s called a loop. Have you come across that term before?
Wanda Stanley
I’ve heard of it, but I’m a little confused about what it actually means in coding. Can you explain, like, what a loop actually does? Maybe, uh, three different ways?
Sam Quinn
That’s completely normal. A loop is basically a way to tell the computer to repeat an instruction or a set of instructions — instead of writing the same thing many times. So, it helps make your code shorter and more efficient. Imagine you’re brushing your teeth and you keep brushing until your timer beeps. Or, uh, you’re eating chips and you keep going until the bag is empty. That’s a loop. In code, you write it out so the computer knows when to start and when to stop.
Wanda Stanley
Hmm, okay… so it’s like a shortcut?
Sam Quinn
Yes! That’s a good way to think of it. Imagine you want the computer to print the same sentence five times. Without a loop, you’d need to write that sentence five times. But with a loop, you can write it once, and the computer will follow the process and repeat it for you.
Wanda Stanley
Okay, but what if I make a mistake inside the loop? Will it repeat the mistake too?
Sam Quinn
That’s a smart question — and yes, it will. The computer only follows the instructions you give it. So if there’s a mistake in the loop, the computer will repeat that mistake unless you fix or clarify the steps. That’s why we always test and review our code, step-by-step.
Wanda Stanley
That makes sense. I feel like asking questions—even the ones that sound kind of dumb—actually helps so much. Like, I used to be afraid to ask, But every time I did, I learned something new. And honestly, it’s the same with learning English. If you don’t ask, you just stay confused.
Sam Quinn
Absolutely. I always tell my students, "If you’re wondering about it, someone else is too." And sometimes, the best breakthroughs come from those "embarrassing" questions. so feel free to ask anytime wanda! Next time, we’ll write a simple loop together. You’ll see how easy it is once we break it down into clear steps.
Wanda Stanley
Looking forward to it! Thanks for explaining everything so clearly.