6

Course 4 | Lesson 6

Artist: Variables


Lesson time: 30 Minutes

Lesson Overview

In this lesson, students will explore the creation of repetitive designs using variables. Students will learn how variables can be used to make code more simple to write and easier to read.

Teaching Summary

Getting Started

Introduction

Activity: Artist: Variables

Artist: Variables

Extended Learning

Extension Activities

Lesson Objectives

Students will:

  • Create programs that utilize repetition to create gorgeous designs
  • Use trial and error to recreate detailed designs in proper scale
  • Calculate angles by dividing 360 by the number of sides in a polygon
  • Decompose a shape into its smallest repeatable sequence

Getting Started

Introduction

Remind your students of the unplugged lesson from a previous class.

  • What if you wanted to draw a square on the board and each side was labeled "side"
    • What would happen if you had an envelope labeled "side" with "10 inches inside"?
    • What would happen to the square if you switched the paper in the "side" envelope to "20 inches"?
    • What if you labeled the sides of the square with "2*side"?

Next, review with students the basic artist navigation, particularly:

  • Moving forward
  • Turning left/right
  • Looping
  • Angles

Activity

Artist: Variables

This lesson explores the use of variables as a way to quickly change many values at one time. Not only will the students be dealing with the looping of designs and repetition of angles, they'll also be doing math on variables. It can be helpful for them to have paper and pencil to figure out values as they go. Also, let them know ahead of time that there will likely be some puzzles that confuse or frustrate them. This is normal, and expected. Students should prepare themselves for persistence and perseverance.

Extended Learning

Use these activities to enhance student learning. They can be used as outside of class activities or other enrichment.

Get Steppin'

Get a few volunteers to come to the front of the room. Assign the group a shape (like a line, a triangle, or a square) with each side length "side". Give each volunteer an envelope labeled "side" with different numbers of steps inside of each. Have them all start walking to make whatever shape you assigned, but each only gets to walk the number of steps inside their envelope before they turn.

  • Do one sample, then ask the class if they can tell where the variable came in
  • After you've done the square, ask the class how we might be able to use the same variable to create a rectangle with a length that's twice the width.
  • How else might we use the same variable to change our polygons?
  • Where could we use a second variable? What might we call it?

Connections and Background Information

PARCC / Smarter Balanced Assessment Skills

  • Click / tap
  • Drag and drop
  • Select object
  • Select and drag / slide
  • Use video player

ISTE Standards (formerly NETS)

  • 1a. Apply existing knowledge to generate new ideas, products, or processes
  • 1b. Create original works as means of personal or group expression
  • 1c. Use models and simulation to explore complex systems and issues
  • 4b. Plan and manage activities to develop a solution or complete a project
  • 6a. Understand and use technology systems
  • 6c. Troubleshoot systems and applications
  • 6d. Transfer current knowledge to learning of new technologies

CSTA K-12 Computer Science Standards

  • CT.L1:3-01 Use technology resources (e.g., puzzles, logical thinking programs) to solve age appropriate problems
  • CL.L1:3-02 Work cooperatively and collaboratively with peers teachers, and others using technology
  • CT.L2-01 Use the basic steps in algorithmic problem solving to design solutions
  • CT.L2-06 Describe and analyze a sequence of instructions being followed
  • CT.L2-12 Use abstraction to decompose a problem into sub problems
  • CPP.L1:6-05 Construct a program as a set of step-by-step instructions to be acted out
  • CPP.L1:6-06 Implement problem solutions using a block-based visual programming language

Next-Gen Science Standards

  • 3-5-ETS1-2 Generate and compare multiple possible solutions to a problem based on how well each is likely to meet the criteria and constraints of the problem

Common Core Mathematical Practices

  • 1. Make sense of problems and persevere in solving them
  • 2. Reason abstractly and quantitatively
  • 4. Model with mathematics
  • 6. Attend to precision
  • 7. Look for and make use of structure
  • 8. Look for and express regularity in repeated reasoning

Common Core Math Standards

  • 3.OA.3 Use multiplication and division within 100 to solve word problems in situations involving equal groups, arrays, and measurement quantities
  • 3.MD.C.6 Measure areas by counting unit squares (square cm, square m, square in, square ft, and improvised units)
  • 4.NBT.B.4 Fluently add and subtract multi-digit whole numbers using the standard algorithm
  • 4.G.A.1 Draw points, lines, line segments, rays, angles (right, acute, obtuse), and perpendicular and parallel lines. Identify these in two-dimensional figures
  • 4.MD.C.5 Recognize angles as geometric shapes that are formed wherever two rays share a common endpoint, and understand concepts of angle measurement
  • 5.NBT.B.5 Fluently multiply multi-digit whole numbers using the standard algorithm

Common Core Language Arts Standards

  • L.3.6 Acquire and use accurately grade-appropriate conversational, general academic, and domain-specific words and phrases, including those that signal spatial and temporal relationships
  • L.4.6 Acquire and use accurately grade-appropriate general academic and domain-specific words and phrases, including those that signal precise actions, emotions, or states of being and that are basic to a particular topic
  • L.5.6 Acquire and use accurately grade-appropriate general academic and domain-specific words and phrases, including those that signal contrast, addition, and other logical relationships