< Course D (2024)

Lesson 11: Drawing Shapes with Loops

60 minutes

Overview

This skill-building lesson builds on the understanding of loops from the previous lesson and doubles as a debugging exercise for extra problem-solving practice.

Purpose

This series highlights the power of loops with an array of puzzles meant to get students thinking about why repeat loops are superior to longhand.

CSTA K-12 Computer Science Standards (2017)
    • 1B-AP-10 - Create programs that include sequences, events, loops, and conditionals.
    • 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.
    • 1B-CS-03 - Determine potential solutions to solve simple hardware and software problems using common troubleshooting strategies.

Agenda

Objectives

Students will be able to:
  • Differentiate between commands that need to be repeated in loops and commands that should be used on their own.
  • Identify the benefits of using a loop structure instead of manual repetition.

Preparation

  • Play through the puzzles to find any potential problem areas for your class.

Links

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

For the teachers

Vocabulary

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

Teaching Guide

Warm Up (15 minutes)

Introduction

Students should have had an introduction to loops at this point. Based on what you think your class could benefit from, we recommend:

  • Reviewing a puzzle from the last lesson
  • Previewing a puzzle from this lesson

Any of these should help prepare your class for fun with the online puzzles!

 

Display: Show “Reflect” slide

Reflect: When should you use a loop in your program?

 

Display: Show “Vocabulary” slide

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

  • Repeat - To do something again.

Main Activity (30 minutes)

Online Puzzles

Some students may discover where to add repeat loops by writing out the program without loops then circling sections of repetitions. If the students in your class seem like they could benefit from this, have them keep paper and pencils beside them at their computers. Students might also enjoy drawing some of the shapes and figures on paper as they program online.

Drawing Shapes with Loops

 

Display: Show “Level 1 - Artist Intro with JR Hildebrand” video

 

Display: Show “Level 2-3 - Skill Building” slide

 

Display: Show “Loops with the Artist” video

 

Display: Show “Level 10 - Challenge” slide

 

Display: Show “Level 11 - Practice” slide

Lesson Extras

Display: Show “Lesson Extras” slide

Wrap Up (15 minutes)

Reflection

Display: Show “Reflect” slide

Reflect: What is another shape or figure you could program using loops? What is the code you used to create it?

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.