# Teaching loops and efficiency

**URL:** https://forum.code.org/t/teaching-loops-and-efficiency/405
**Category:** General Teaching and Learning (All Grades)
**Created:** [June 4, 2015, 9:54pm UTC](https://forum.code.org/t/teaching-loops-and-efficiency/405 "2015-06-04T21:54:37Z")
**Posts on this page:** 20
**Page:** 4

<div class="post-metadata">

### Author: ![jscoville](https://avatars.discourse-cdn.com/v4/letter/j/b487fb/32.png) [@jscoville](https://forum.code.org/u/jscoville)
#### Post date: [June 21, 2016, 1:29am UTC](https://forum.code.org/t/teaching-loops-and-efficiency/405/61 "2016-06-21T01:29:17Z")

</div>

I think my kindergarteners would love the idea of learning looping with a dance. What a great idea!

---

<div class="post-metadata">

### Author: ![jillo\_127](https://avatars.discourse-cdn.com/v4/letter/j/8e8cbc/32.png) [@jillo\_127](https://forum.code.org/u/jillo_127)
#### Post date: [July 7, 2016, 12:31pm UTC](https://forum.code.org/t/teaching-loops-and-efficiency/405/62 "2016-07-07T12:31:47Z")

</div>

During the winter months I am always looking forward ways to get my student up in moving in the winter months during indoor recess. To teach the concept of loops I would come up with a exercise routine 10 jumping jacks, 5 toe touches, 3 frog jumps, etc. I would write down every step jumping jack, jumping jack, jumping jack until it became too tedious. I would ask the student to generate a better way for me to write down our routine. Hopefully, they will come up with a more efficient way to write the direction…a loop.

---

<div class="post-metadata">

### Author: ![linda\_nielsen](https://avatars.discourse-cdn.com/v4/letter/l/c67d28/32.png) [@linda\_nielsen](https://forum.code.org/u/linda_nielsen)
#### Post date: [July 7, 2016, 8:54pm UTC](https://forum.code.org/t/teaching-loops-and-efficiency/405/63 "2016-07-07T20:54:16Z")

</div>

We have have a very small school. Most students are into many sports sports (football, track, volleyball etc). I think our students would easily make connection between oops and lgorithms. The repetition required to train and perform well in sports is basically looping. The steps required to make a basketball go into the hoops, the planned plays to get a football down the field, can all be presented as an algorithm

---

<div class="post-metadata">

### Author: ![wendy\_duha](https://avatars.discourse-cdn.com/v4/letter/w/e480ec/32.png) [@wendy\_duha](https://forum.code.org/u/wendy_duha)
#### Post date: [July 15, 2016, 12:28am UTC](https://forum.code.org/t/teaching-loops-and-efficiency/405/64 "2016-07-15T00:28:23Z")

</div>

I liked all of the ideas shared by other educators. The dance seems like a good idea as does the idea about an exercise routine. You could also use the idea of having one student direct another to tally items. For example have the students grab a handful of marbles then have them tell a partner to tally the total by drawing lines on a piece of paper. Which works best to tell you partner to “Draw a line, draw another line, …” or telling them to draw 7 lines?

---

<div class="post-metadata">

### Author: ![letranxuanphuong](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/letranxuanphuong/32/1204_2.png) [@letranxuanphuong](https://forum.code.org/u/letranxuanphuong)
#### Post date: [July 17, 2016, 2:48am UTC](https://forum.code.org/t/teaching-loops-and-efficiency/405/65 "2016-07-17T02:48:34Z")

</div>

I usually use our daily routines and activities to demonstrate about algorithm. For example, we have a swimming workout goal that is to finish 10 rounds a day (which will make them tired yes 😃 ). And my kids say they wish they could only do 1 round and loop it to 10 times. hehe

---

<div class="post-metadata">

### Author: ![Silvia1CS](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/silvia1cs/32/1218_2.png) [@Silvia1CS](https://forum.code.org/u/Silvia1CS)
#### Post date: [July 19, 2016, 6:09pm UTC](https://forum.code.org/t/teaching-loops-and-efficiency/405/66 "2016-07-19T18:09:58Z")

</div>

I would start with the unplugged lesson first. Having them follow the same command repetitively usually with repetitive movements. Then, students would write down the loops.

---

<div class="post-metadata">

### Author: ![Silvia1CS](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/silvia1cs/32/1218_2.png) [@Silvia1CS](https://forum.code.org/u/Silvia1CS)
#### Post date: [July 20, 2016, 8:19am UTC](https://forum.code.org/t/teaching-loops-and-efficiency/405/67 "2016-07-20T08:19:02Z")

</div>

I would start with the unplugged lesson too, having them follow the same command repetitively usually with repetitive movements. Then, students would write down the loops. I cannot wait to show what I learned to my English a Second language students.

 ![](https://us1.discourse-cdn.com/flex016/uploads/codeorgforum/original/2X/6/668b01936131cbecb419b9179638942da4c46775.jpg)

---

<div class="post-metadata">

### Author: ![jenny\_grindle](https://avatars.discourse-cdn.com/v4/letter/j/9dc877/32.png) [@jenny\_grindle](https://forum.code.org/u/jenny_grindle)
#### Post date: [July 20, 2016, 4:26pm UTC](https://forum.code.org/t/teaching-loops-and-efficiency/405/68 "2016-07-20T16:26:12Z")

</div>

I plan to use the video about examples of looping in everyday life to kick off our thinking.

---

<div class="post-metadata">

### Author: ![bbaker](https://avatars.discourse-cdn.com/v4/letter/b/5fc32e/32.png) [@bbaker](https://forum.code.org/u/bbaker)
#### Post date: [July 24, 2016, 7:19pm UTC](https://forum.code.org/t/teaching-loops-and-efficiency/405/69 "2016-07-24T19:19:53Z")

</div>

5th grade-once again, activate prior knowledge…where have you seen the word loop? (YouTube, ITunes, science, sewing) What does it mean? I like the idea of using the lyrics to a song, dance moves and various math applications as examples.

---

<div class="post-metadata">

### Author: ![cindy\_lewis](https://avatars.discourse-cdn.com/v4/letter/c/bbe5ce/32.png) [@cindy\_lewis](https://forum.code.org/u/cindy_lewis)
#### Post date: [August 3, 2016, 1:19pm UTC](https://forum.code.org/t/teaching-loops-and-efficiency/405/70 "2016-08-03T13:19:13Z")

</div>

In teaching loops and efficiency, I like the idea of having the students do a mundane task over and over again with each step said every time. This could be in a simple game of “Mother, May I?” or “Simon Says.” After doing it a few times hopefully the students will see how boring it is and as a class figure out a way to be more efficient.

---

<div class="post-metadata">

### Author: ![mpolley](https://avatars.discourse-cdn.com/v4/letter/m/6f9a4e/32.png) [@mpolley](https://forum.code.org/u/mpolley)
#### Post date: [August 8, 2016, 4:52pm UTC](https://forum.code.org/t/teaching-loops-and-efficiency/405/71 "2016-08-08T16:52:44Z")

</div>

I explain to students that humans naturally find patterns, when you find a pattern in a sequence then you can use a loop.

---

<div class="post-metadata">

### Author: ![tcooper](https://avatars.discourse-cdn.com/v4/letter/t/278dde/32.png) [@tcooper](https://forum.code.org/u/tcooper)
#### Post date: [August 14, 2016, 2:20pm UTC](https://forum.code.org/t/teaching-loops-and-efficiency/405/72 "2016-08-14T14:20:51Z")

</div>

I do something similar to the others who discuss classroom activities. I ask students to document their daily activity over a period of several days. After a couple of days, the students often ask if they can use shorthand for the repeated activities. This leads to a discussion on looping.

---

<div class="post-metadata">

### Author: ![linda\_kozden](https://avatars.discourse-cdn.com/v4/letter/l/e0b2c6/32.png) [@linda\_kozden](https://forum.code.org/u/linda_kozden)
#### Post date: [August 16, 2016, 4:36am UTC](https://forum.code.org/t/teaching-loops-and-efficiency/405/73 "2016-08-16T04:36:38Z")

</div>

I will be teaching coding in a Coding Club. So, I feel that this first year will be a time to see what works and what doesn’t work without stress since the students will not be receiving grades.

---

<div class="post-metadata">

### Author: ![j\_marcotte](https://avatars.discourse-cdn.com/v4/letter/j/ccd318/32.png) [@j\_marcotte](https://forum.code.org/u/j_marcotte)
#### Post date: [August 27, 2016, 1:27am UTC](https://forum.code.org/t/teaching-loops-and-efficiency/405/74 "2016-08-27T01:27:41Z")

</div>

A loop is something you repeat. For example a daily schedule, if it is the same everyday rather than writing it out you may represent a loop by indicating it repeats daily or weekly ect. Rather than rewriting it out every time you do it.

---

<div class="post-metadata">

### Author: ![gretchen.sting](https://avatars.discourse-cdn.com/v4/letter/g/4491bb/32.png) [@gretchen.sting](https://forum.code.org/u/gretchen.sting)
#### Post date: [September 7, 2016, 7:39pm UTC](https://forum.code.org/t/teaching-loops-and-efficiency/405/75 "2016-09-07T19:39:35Z")

</div>

Loops are like the continuation of the spinning of the Ferris wheel. It keeps going round

---

<div class="post-metadata">

### Author: ![terence.stone25](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/terence.stone25/32/5124_2.png) [@terence.stone25](https://forum.code.org/u/terence.stone25)
#### Post date: [September 8, 2016, 4:00am UTC](https://forum.code.org/t/teaching-loops-and-efficiency/405/76 "2016-09-08T04:00:44Z")

</div>

I used the lightbot app in class to introduce programming to my Java Honors class. I had a discussion where I asked the students to outline things they used in their lives that repeated (time, sleep, etc.,). As they shared, I asked if there were instances where those things that repeated could be shortened. We then made the,connections in lightbot.

---

<div class="post-metadata">

### Author: ![kimberley.bussey](https://avatars.discourse-cdn.com/v4/letter/k/53a042/32.png) [@kimberley.bussey](https://forum.code.org/u/kimberley.bussey)
#### Post date: [September 23, 2016, 4:23am UTC](https://forum.code.org/t/teaching-loops-and-efficiency/405/78 "2016-09-23T04:23:33Z")

</div>

I like the idea of making the loop a concrete activity for my younger students. I think I would like to have them choose a specific action and repeat it over and over. After a little while they will probably get tired and after that we can discuss why using the repeat block might make it easier to do things.

---

<div class="post-metadata">

### Author: ![jdono12](https://avatars.discourse-cdn.com/v4/letter/j/9dc877/32.png) [@jdono12](https://forum.code.org/u/jdono12)
#### Post date: [September 27, 2016, 3:55am UTC](https://forum.code.org/t/teaching-loops-and-efficiency/405/79 "2016-09-27T03:55:18Z")

</div>

To explain the concept of loops to my year 3 students I would begin by instructing one student to do a simple action, e.g. ‘stand up’. Then I would say ‘sit down’. Then I would repeat it again, ‘Stand up. Sit down.’ Repeat it again. When the student has repeated the process a couple of times I will say that it may have been a lot easier, and quicker if I had asked him/her to stand up and sit down four times.

I will explain to the students that a loop is used to help us save steps when programming. You can shorten directions by putting some steps in a loop.

We will then look at the Unplugged Activity of the dance steps and work through the process of identifying steps we could put into a loop.

---

<div class="post-metadata">

### Author: ![jjones](https://avatars.discourse-cdn.com/v4/letter/j/df705f/32.png) [@jjones](https://forum.code.org/u/jjones)
#### Post date: [October 26, 2016, 7:43pm UTC](https://forum.code.org/t/teaching-loops-and-efficiency/405/80 "2016-10-26T19:43:21Z")

</div>

For the Course 2, Stage 5, Getting Loopy, the Iteration Dance, I used a combination of [Jukedeck.com](http://Jukedeck.com) and acid express music loop editing software. I created some music to go with the dance moves, with the exception that I had to add a “step-turn” sequence after the repeated section, and I had the kids repeat the moves 5 times instead of 3 to fill the entire music with dance moves. The kids thought it was cool to have their very own music to dance to. I even had a few kids say they had heard the song before and liked it, even though I wrote it from scratch. Ha ha!  
Here is a link to the music. I will post another video soon with older kids doing the dance so you can see how the dance moves coordinate to the music. [https://www.youtube.com/watch?v=dRGUPa0y248](https://www.youtube.com/watch?v=dRGUPa0y248)  
Here is a link to the google sheets presentation I used to demo the idea of shortening the dance with loops. It shows the alterations I made to the dance steps so the dance will fit the music better. [https://docs.google.com/presentation/d/102ppLJbSXvT5\_-cG5PRyzy0WxoODcrTX3Y2bvnV9ckI/edit?usp=sharing](https://docs.google.com/presentation/d/102ppLJbSXvT5_-cG5PRyzy0WxoODcrTX3Y2bvnV9ckI/edit?usp=sharing)

---

<div class="post-metadata">

### Author: ![jtlarowe](https://avatars.discourse-cdn.com/v4/letter/j/3d9bf3/32.png) [@jtlarowe](https://forum.code.org/u/jtlarowe)
#### Post date: [November 8, 2016, 8:31pm UTC](https://forum.code.org/t/teaching-loops-and-efficiency/405/81 "2016-11-08T20:31:05Z")

</div>

I have music playing in the library most days. I’d illustrate the idea of a loop by literally showing them the “looping” option in my iTunes.When I click this, it plays the song over and over again…OR, I can choose a playlist (a block of code, if you will) and tell iTunes to loop the whole list.

[Previous page](https://forum.code.org/t/teaching-loops-and-efficiency/405.md?page=3)

[Next page](https://forum.code.org/t/teaching-loops-and-efficiency/405.md?page=5)
