Teaching loops and efficiency

I love the idea of having them physically get up and do an activity over and over again. I could ask a student to bring me blue crayon, wait until yhey go back to their seat, and then ask for another blue crayon. Repeat. I think it would really drive home the concept.

Being new to teaching coding, I haven’t had to teach loops yet. But I really like the idea of getting the kids up and moving to physically demonstrate how it is easier to use a loop rather than repeat the same instruction 5 times because I think it really gets the point across in a way that isn’t as clear when working on a program like code.org.

This looks like something that could be done with skip counting with younger grades.

I teach high school math - Algebra 1 to 9th grade students. I think that the most straightforward way to introduce the idea of loops to students is to compare it to repeated steps or directions. The first thing that comes to mind to me as it relates to my Algebra 1 curriculum is exponent properties. Exponents are repeated multiplication, so in essence, they are a loop. 4^5 is a more efficient way of writing: 4 x 4 x 4 x 4 x 4. The same operation (multiplication) is being repeated over and over, and that is captured by writing it out as an exponent instead. I think that discussing it in this context would be helpful for students, but I would also want them to come up with their own examples as well of where we see the concepts of loops - either in math class, or in other aspects of their lives.

How would you explain the concept of loops to your students?

I would explain looping as a repetition of steps. I would like the words repeat and loop.

The idea of looping seems pretty cool. I know that my kids are always looking for short-cuts, and I believe looping is a great way to save time and energy when writing the code. I relate this to the “broken record player” comment we used to get a lot when I was in school as a student. Teachers always complained about repeating themselves. So I think I would present this idea as a way of repeating myself without having to plan to do so by writing the thought multiple times. I would just write the idea once and then loop it!