7

Course 4 | Lesson 7

Play Lab: Variables


Lesson time: 30 Minutes

Lesson Overview

In this activity, students will have the opportunity to play with variables in a situation that illustrates just how useful they can be. Students will edit games to give themselves the advantage and make their characters more powerful using variables as parameters.

Teaching Summary

Getting Started

Introduction

Activity: Play Lab: Variables

Play Lab: Variables

Extended Learning

Extension Activities

Lesson Objectives

Students will:

  • Identify the numbers that are responsible for specific elements of a program
  • Create a game that incorporates numerical parameters
  • Replace numbers with descriptive variables

Getting Started

Introduction

Review the previous lesson, paying particular attention to the use of variables.

  • What is a variable, and how many ways can you think to use them?
  • Now you're going to create games online using variables instead of entering numbers.

Activity

Play Lab: Variables

This lesson will guide the students from a place where they are playing a game programmed using numbers traditionally, to a place where they substitute variables for numerical values so that their program is easier to read.

The challenges with this stage come about most when they are trying to remember to use variables in free play at the end. It may be helpful to walk around and ask the students to show you where and how they are using variables, and why they chose the names that they came up with.

Extended Learning

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

Variable Surprise

Bring your students back to Play Lab and have them create any game they want, with the requirement that they each have variables called "step" and "fly".

  • Once students have had a chance to make something, encourage the class to walk around to look at one another's programs.
    • Did any of the games have similarities?
    • How might the variable names have influenced the creation of the games?
  • Have the students go back to edit their games.
    • Ask the students to set "step" to 2 and "fly" to 20 and share out how that changed their original creations.
      • Did it affect anyone in a way that was unexpected?
      • Note that the students all had the same variable names, but they likely used them differently.

Connections and Background Information

PARCC / Smarter Balanced Assessment Skills

  • Click / tap
  • Drag and drop
  • Scroll
  • Select and drag / slide
  • Select object

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

  • 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.L2-01 Use the basic steps in algorithmic problem solving to design solutions
  • 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
  • CPP.L1:3-03 Create developmentally appropriate multimedia products with support from teachers, family, or student partners
  • 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
  • CPP.L2-08 Demonstrate dispositions amenable to open-ended problem solving and programming

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

  • 4.NBT.B.4 Fluently add and subtract 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