# Lesson 9: Loops with Laurel

## Overview

In this lesson, students continue learning the concept of loops. In the previous lesson, students were introduced to loops by moving through a maze and picking corn. Here, loops are used to collect treasure in open cave spaces.

## Purpose

This lesson gives students more practice with loops and introduces a new block, `get treasure`. The block works just like `pick corn` did in Harvester. These puzzles are more open, giving students more flexibility for their final solutions.

## Objectives

### Students will be able to:

• Identify the benefits of using a loop structure instead of manual repetition.
• Break down a long sequence of instructions into the smallest repeatable sequence possible.

## Preparation

Heads Up! Please make a copy of any documents you plan to share with students.

## Vocabulary

• Loop - The action of doing something over and over again.
• Repeat - To do something again.

# Teaching Guide

## Warm Up (10 min)

### Introduction

Quickly review the definition of a loop, the action of doing something over and over again.

• What are loops?
• Why do we use them?

## Main Activity (30 min)

### Online Puzzles

#### Teacher Demonstration

We've included some multiple choice prediction levels that are difficult for non-readers. These levels are optional for you to review with your class to help prepare for the puzzles to come. Alternatively, these could be used after finishing the stage as a review for the class.

Lesson Tip:

Some students may be curious about what happens when you add more blocks inside a repeat loop. Make sure to explain that the repeat loop goes through every block inside it once, then starts back over from the top and repeats that. It does not just repeat each block inside that many times and move to the next one.

Prediction Levels:

As students work through the puzzles, see if they can figure out how many blocks they use with a loop vs. without a loop.

## Wrap Up (5 - 10 min)

### Journaling

Having students write about what they learned, why it’s useful, and how they feel about it can help solidify any knowledge they obtained today and build a review sheet for them to look to in the future.

#### Journal Prompts:

• What was today’s lesson about?
• Draw one of the Feeling Faces - Emotion Images that shows how you felt about today's lesson in the corner of your journal page.
• How did loops make your program easier to write?
• Draw something that uses loops.
• The Collector
• 1
• (click tabs to see student view)
View on Code Studio

### Student Instructions

• Practice
• 2
• 3
• (click tabs to see student view)
View on Code Studio

### Student Instructions

Free Play: This is Laurel the Adventurer! Move her around and get as much treasure as you can.

Drag blocks into the workspace and try to figure out how to get treasure. Get at least one item to pass this level.

View on Code Studio

### Student Instructions

Get all three piles! Move Laurel to each piece of treasure, then use the get treasure block.

• Using the Repeat Block
• 4
• (click tabs to see student view)
View on Code Studio

### Student Instructions

View on Code Studio

### Student Instructions

How can Laurel get all five piles of treasure using only one move east block?

View on Code Studio

### Student Instructions

View on Code Studio

### Student Instructions

View on Code Studio

### Student Instructions

View on Code Studio

### Student Instructions

View on Code Studio

### Student Instructions

• Challenge
• 11
• (click tabs to see student view)
View on Code Studio

### Student Instructions

View on Code Studio

### Student Instructions

View on Code Studio

### Student Instructions

View on Code Studio

### Student Instructions

"Eureka! Get as much treasure as you can!"
(You do not have to get it all.)

View on Code Studio

### Student Instructions

View on Code Studio

### Student Instructions

"Can you help me spot some bugs? I know which way I want to go, but I'm not sure how many steps to take."

## Standards Alignment

#### CSTA K-12 Computer Science Standards (2017)

AP - Algorithms & Programming
• 1A-AP-09 - Model the way programs store and manipulate data by using numbers or other symbols to represent information.
• 1A-AP-10 - Develop programs with sequences and simple loops, to express ideas or address a problem.
• 1A-AP-11 - Decompose (break down) the steps needed to solve a problem into a precise sequence of instructions.
• 1A-AP-14 - Debug (identify and fix) errors in an algorithm or program that includes sequences and simple loops.