Teaching loops and efficiency

I have introduced “loops” to my Grade 4 as “patterns that has repetition” I pair them into groups of two, one pretends to be the “robot” and the other a “programmer.” The programmer must want the robot to go somewhere around the classroom and find him/her something. And all the programmer does is say the directions “move forward, move backwards, turn left, turn right” until the robot reaches the destination.

I think the best way to introduce loops to my 6th graders is through dances or robotics.

I think, I would use the video " Getting Loopy" to help the students to understand loop concept. Then, strengthen the understanding with the iteration activities which is not only fun but very practical to define the concept.

Music patterns. Such as showing the repeated pattern that music uses to structure a song. Then take a 30 portion of that song and mix it with another 30 second song clip. When you mix these together we are creating a loop.

With students we could have 4 rows(numbered Row 1, Row 2, Row 3, and Row 4). The odd numbered rows would replicate one drum beat (ba diddy ba diddy diddy diddy ba) while the even numbered rows would replicate another drum beat (ba dun dun dun, ba dun dun dun). We could add step into the loop and pen beats or tapping.

I would use the video as well! It will be a fun introduction before showing the kids how to use dance and repetition to complete the loops.

I love the idea of getting the students up and dancing, because so many students learn at different levels and by different strategies! Plus it’s would be fun when they begin seeing where the loop starts over again!

In order to introduce loops to the students I see an opportunity to work with the PE teacher. The students could analyse a dance and then create their own using loops/repeating sequences.

With younger students I think the Macarena Dance is perfect. Especially with my class this year, I catch them dancing it all the time. The have no idea they are “looping”.

Love it, thanks for sharing :slight_smile:

I would explain the concept of looping by demonstrating and modeling. Drawing loops on the whiteboard or hula hooping would be easy for the students to comprehend.

Yes!!! I love this! I plan to use dancing with my Kinders.

I am so excited to teach looping. This past year the flossing dance move was every where at school, I think this would be an excellent example that the students could quickly relate to. I also really like the my robotic friend looping activity to use with my older students! I can’t believe how excited I am about getting the kids engaged in computer science!

I teach First grade and my students would love to teach me how to do the FLOSS dance. Because there is lots of looping it would lend itself to a great looping program. We could begin by watching students do it quickly, then having them slow it down to slow motion. Working in pairs they could write the sequencing by using arrows for the back and forth motion and the left/right arrows for the front and back swing. Then pairs could switch their algorithym with other pairs to try what they wrote down and check for bugs or celebrate with a 4-some floss dance. Gradually the whole class would have shared and our group of dancers, including me, could do the floss together while learning about LOOPING!

I would explain loops as anything you do repeatedly or in a pattern.

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!