< Course B (2021)

Lesson 9: Drawing Gardens with Loops

45 minutes

Overview

In this skill-building lesson, students learn to draw images by looping simple sequences of instructions. Here, students use loops to create patterns.

Purpose

This lesson gives a different perspective on how loops can create things in programming. Students will test their critical thinking skills by evaluating given code and determining what needs to be added in order to solve the puzzle. Students can also reflect on the inefficiency of programming without loops here because of how many blocks the program would require without the help of repeat loops.

CSTA K-12 Computer Science Standards (2017)
    • 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.

Agenda

Objectives

Students will be able to:
  • Count the number of times an action should be repeated and represent it as a loop.
  • Create a program that draws complex shapes by repeating simple sequences.
  • Decompose a shape into its largest repeatable sequence.

Preparation

  • Play through the puzzles before the lesson to find any potential problem areas for your class.
  • Review *CS Fundamentals Main Activity Tips - Lesson Recommendations.
  • Make sure each student has a reflection journal.

Links

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

For the teachers
For the students

Vocabulary

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

Teaching Guide

Warm Up (10 minutes)

Introduction

  • Quickly review the definition of a loop, the action of doing something over and over again.
  • Discuss different patterns like zigzags and stairsteps.
    • How would you explain to someone how to draw that pattern?
    • How could you draw this using a loop?

In the artist levels, students will be using 45 degree angles described as northwest, northeast, southwest, southeast. We recommend briefly discussing these directions with the class and drawing an image for students to refer back to.

Main Activity (30 minutes)

Teacher Demonstration

Teaching Tip

Remind the students to only share their work with their close friends or family. For more information watch or show the class *Pause and Think Online - Video

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.

Prediction Level: - Course B, Loops in Artist

Wrap Up (5 minutes)

Reflection

Prompts:

  • What was today’s lesson about?
  • Draw a face that shows how you felt about today's lesson in the corner of your journal page.
  • Draw the patterns you made with a loop.
  • Draw a pattern that you would like to make with a loop.

Cross-Curricular Opportunity

Loopy Shapes (30-45 minutes)

Computer Science + English Language Arts + Math

Loopy Shapes is an optional activity aligned to Common Core ELA and Math standards, written by our teacher community. Working with a partner, students will use loops to program two-dimensional shape while using collaborative conversations to ask clarifying questions.

Standards Addressed:

  • CCSS.ELA-LITERACY.SL.1.1: Participate in collaborative conversations with diverse partners about grade 1 topics and texts with peers and adults in small and larger groups.

  • CCSS.ELA-LITERACY.SL.1.1.C: Ask questions to clear up any confusion about the topics and texts under discussion.

  • CCSS.ELA-LITERACY.SL.1.5: Add drawings or other visual displays to descriptions when appropriate to clarify ideas, thoughts, and feelings.

  • CCSS.MATH.CONTENT.1.G.A.2: Compose two-dimensional shapes (rectangles, squares, trapezoids, triangles, half-circles, and quarter-circles) or three-dimensional shapes (cubes, right rectangular prisms, right circular cones, and right circular cylinders) to create a composite shape, and compose new shapes from the composite shape.

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.