Lesson 4

Variables

This lesson introduces variables as a way to manage values in a program. Students will first be introduced to creating, naming, and setting the value of a variable in Scratch. They will then distinguish between local variables and global variables through a PRIMM activity. Finally, students will return to their simulations and create local variables to manage the energy levels of the organisms in their simulations.

school
Grade 7
local_library
Subject Science
schedule
Length of lesson 50 minutes

Learning objective

Students will create local variables to manage a value.

Standards

CSTA Standards

  • 2-AP-11: Create clearly named variables that represent different data types and perform operations on their values.
  • 2-AP-19: Document programs in order to make them easier to follow, test, and debug.
  • 3-DA-10: Evaluate the tradeoffs in how data elements are organized and where data is stored.

NGSS Standards

  • MS-LS2-3: Develop a model to describe the cycling of matter and flow of energy among living and nonliving parts of an ecosystem.