2.1 Unplugged

In this unplugged lesson, students decompose the chicken dance and realize that the code can be shorter if they use a loop.

CS Concept : Loops

OBJECTIVES:

By the end of this lesson, students will

  • identify a repeat loop and recognize why it is useful.

TEACHER RESOURCES:

Standards

    • CSTA 2-AP-12: Design and iteratively develop programs that combine control structures, including nested loops and compound conditionals.

CSTA

Do Now (5 minutes)

What is a Loop and why is it useful? Slides. Figma

LEARNING GOALS:

Beginning

  • Some Tasks involve repeating actions

  • Instructions like “step 3 times” do the same thing as “step, step, step”

Intermediate

  • Repeating things can have a cumulative effect

  • Repetitions can go on forever or stop

  • Different kind of tasks require different kinds of repetition


Unplugged Project ( 45 minutes)

Chicken Dance Slides. figma

    • Project the video Chicken Dance and dance. Notice how steps repeat in a dance.

    • What are the steps for this dance? Try to prompt students to use the word "algorithm" in their replies.

    • Let's use the key word "Loop" to shorten our algorithm.

      • e.g Loop 4 times : hands. Have students say what happens next: Loop 4 times: arms. Loop 4: Shake. Loop 4: Clap.


Dance algorithm handout.

      • Divide students into groups of two and have them create a very short dance routine, using Dance algorithm handout.

      • Students create steps for the dance routine. (an algorithm).

      • Groups swap their dance algorithm and perform each other's dance in front of creators.

      • They debug any steps that do not work and give feedback on efficiency: Could the other team have used a loop to make a shorter algorithm?


Extra Resource: University of Chicago: Loop Charades Slides. (materials: Loop Charade | Manipulatives | Direction wall signs )

Close-Out (5 minutes)

To-day you made an Algorithm for a Dance. You used a loop, so that your instructions were shorter and easier to read.

    1. What are Algorithms?

    2. Why are Loops helpful?

    3. Do you need to use a loop to make a dance?

Potential Responses

      1. Algorithms are a series of steps or directions to do a task.

      2. Less steps are needed, if you use a loop. Loops allow your algorithm to be shorter which makes it easy to read.

      3. No, there is always more than one way to do a task, but loops will save you time!