Grade Levels: K-3

In this lesson plan, adaptable for grades 2-3, students explore BrainPOP Jr. resources to learn about loops and how they make coding more efficient. After sharing and discussing real-world loops, students apply their understanding of loops used in coding by acting out repeated steps in a real-life code.  

Lesson Plan Common Core State Standards Alignments

Students will:

  1. Discuss and share examples of real-life loops.
  2. Watch a BrainPOP Jr. movie about loops.
  3. Create a real-life code using loops.

Materials:

Preparation:

  • Preview the movie Loops to plan for any adaptations.
  • Read Loops Background.
  • Lesson Procedure:

    1. Write “loops” on a whiteboard or other display. Ask students to share what they know about loops. After they share ideas, make sure they understand that loops are actions that repeat. You can share an example, like a rollercoaster that goes round and round in a literal loop. Have them brainstorm other actions that repeat, like combing their hair, eating, and climbing stairs. Maybe they know of dances that repeat moves—those are loops, too! Add all their ideas to a concept map on the board.
    2. Next ask students what they think loops have to do with computer programming. If necessary, remind them that when we code or program something on the computer, we’re giving it instructions of what to do. After they have time to respond, make sure they understand that in computer programming, loops are instructions for repeating actions. Given an example by explaining that rather than putting in three blocks or lines of code that say to move forward one time, they can use a loop that says to repeat the forward movement three times.
    3. Now show the BrainPOP Jr. movie Loops for the whole class. Pause at various points to reinforce student understanding of key concepts and vocabulary. 
    4. After the movie, invite a volunteer to stand by a desk. Ask students what instructions they would give their classmate for walking around the desk, so that she ends up back where she began. If necessary, have the volunteer walk around the desk to model the action.  
      1. Step forward
      2. Turn left
      3. Step forward 
      4. Turn left
      5. Step forward 
      6. Turn left
      7. Step forward
      8. Turn left
    5. After students completed giving instructions, point out that they’ve written 8 lines of code. Ask how they could write these same instructions in fewer lines by using a loop, or alternatively ask which actions repeat in the code. They should recognize that step forward and turn left occur 4 times. Have them re-write the code using a loop: Repeat 4 times: Step forward, turn left
    6. Congratulate them on having rewritten their code by using a loop. Ask them which command creates the loop: repeat 4 times. Point out that the code within the loop gets repeated 4 times.
    7. If time allows, divide the class into small groups and have them come up with an action, such as a dance, that use a repeated action. Then write their own code that uses a loop. Have groups present their code to the class.
    8. Come together as a class and discuss how loops are helpful when coding.