< Course F (2021)

Lesson 11: Programming with the Bee

55 minutes

Overview

In this skill-building lesson, students will be encouraged to figure out how minor changes in loops will affect their program.

Purpose

This lesson introduces (or reviews) how Bee puzzles work and introduces students to nested loops. The next lesson will return to variables.

CSTA K-12 Computer Science Standards (2017)
    • 1B-AP-08 - Compare and refine multiple algorithms for the same task and determine which is the most appropriate.
    • 1B-AP-11 - Decompose (break down) problems into smaller, manageable subproblems to facilitate the program development process.
    • 1B-AP-15 - Test and debug (identify and fix errors) a program or algorithm to ensure it runs as intended.

Agenda

Objectives

Students will be able to:
  • Break complex tasks into smaller repeatable sections.
  • Identify the benefits of using a loop structure instead of manual repetition.
  • Recognize large repeated patterns as made from smaller repeated patterns.

Preparation

  • Play through the puzzles to find any potential problem areas for your class.
  • Make sure every student has a reflection journal.

Links

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

For the students

Vocabulary

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

Teaching Guide

Warm Up (10 minutes)

Introduction

Briefly review with the class what loops are and why we use them.

  • What do loops do?
    • Loops repeat a set of commands.
  • How do we use loops?
    • We use loops to create a pattern made of repeated actions.

Tell the class that they will now be doing something super cool: using loops inside loops. Ask the class to predict what kinds of things we would be using a loop inside of a loop for.

If a loop repeats a pattern, then looping a loop would repeat a pattern of patterns!

Students don't need to understand this right away, so feel free to move on to the online puzzles even if students still seem a little confused.

Main Activity (30 minutes)

Teaching Tip

This lesson can be challenging. Consider using "pair programming" so students can collaborate and support each other.

Wrap Up (15 minutes)

Reflection

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.

Prompts:

  • What was today's lesson about?
  • How did you feel about today's lesson?
  • What is a nested loop?
  • Can you draw a puzzle that would use a nested loop? Try coding the solution to your own puzzle.
Creative Commons License (CC BY-NC-SA 4.0).

This work is available under a Creative Commons License (CC BY-NC-SA 4.0).

If you are interested in licensing Code.org materials for commercial purposes contact us.