5

Course 3 | Lesson 5

Artist: Functions


Lesson time: 30 Minutes

Lesson Overview

As an introduction to functions (reuseable blocks of code), students will use functions to draw shapes on the screen and modify those functions to fit different purposes.

Teaching Summary

Getting Started

Introduction

Activity: Artist: Functions

Artist: Functions

Extended Learning

Extension Activities

Lesson Objectives

Students will:

  • Use a pre-determined function to draw an image with repeated features
  • Modify an existing function to draw a different shape
  • Distinguish between functions and loops
  • Create a program that calls a function from within a loop

Getting Started

Introduction

Reflect with students on the Functional Suncatchers unplugged activity

  • What functions did we use to make suncatchers?
  • Why did we use functions?
  • Now we're going to use functions to make drawing cool images even easier!

Activity

Artist: Functions

Some students may struggle with the difference between the function definition (the actual code of the function) and the function call (used when we tell functions to run). As a visual cue we've place the function definition inside a grey box - you can equate this to the separate sheet they used to write suncatcher functions.

Extended Learning

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

Shape Machines

Ask students to write functions on paper for simple shapes, then create a list of instructions using those functions to draw a picture.

Connections and Background Information

PARCC / Smarter Balanced Assessment Skills

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

ISTE Standards (formerly NETS)

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

CSTA K-12 Computer Science Standards

  • CL.L1:3-02. Work cooperatively and collaboratively with peers teachers, and others using technology.
  • CT.L1:3-01. Use technology resources (e.g., puzzles, logical thinking programs) to solve age appropriate problems.
  • CT.L1:6-01. Understand and use the basic steps in algorithmic problem-solving.
  • 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.
  • 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-07. Represent data in a variety of ways: text, sounds, pictures, numbers.
  • CT.L2-08. Use visual representations of problem states, structures, and data.
  • CT.L2-12. Use abstraction to decompose a problem into sub problems.
  • CT.L2-14. Examine connections between elements of mathematics and computer science including binary numbers, logic, sets, and functions.
  • CT.L3A-03. Explain how sequence, selection, iteration, and recursion are building blocks of algorithms.

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
  • 5. Use appropriate tools strategically.
  • 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.G.A.2 - Partition shapes into parts with equal areas. Express the area of each part as a unit fraction of the whole.
  • 4.NBT.B.4 - Fluently add and subtract multi-digit whole numbers using the standard algorithm.
  • 4.MD.A.3 - Apply the area and perimeter formulas for rectangles in real world and mathematical problems.
  • 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.
  • 4.MD.C.7 - Recognize angle measure as additive.
  • 4.G.A.1 - Draw points, lines, line segments, rays, angles (right, acute, obtuse), and perpendicular and parallel lines.
  • 4.G.A.2 - Classify two-dimensional figures based on the presence or absence of parallel or perpendicular lines, or the presence or absence of angles of a specified size.
  • 4.G.A.3 -Recognize a line of symmetry for a two-dimensional figure as a line across the figure such that the figure can be folded along the line into matching part.
  • 5.NBT.B.5 - Fluently multiply multi-digit whole numbers using the standard algorithm.
  • 5.G.A.2 - Represent real world and mathematical problems by graphing points in the first quadrant of the coordinate plane, and interpret coordinate values of points in the context of the situation.

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