Lesson 5

Programming interactions

In this lesson, students are introduced to conditionals as statements that only run a command if a specific condition is met. They identify conditions as statements that are either true or false. Through a code tracing and flowcharting activity, the class evaluates the need for some conditionals to be looped. Finally, they decompose the interactions that occur among organisms before returning to their simulation to program the interactions that concern their primary consumers.

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

Learning objective

Students will program interactions between sprites.

Standards

CSTA Standards

  • 2-AP-11: Create clearly named variables that represent different data types and perform operations on their values.
  • 2-AP-12: Design and iteratively develop programs that combine control structures, including nested loops and compound conditionals.
  • 2-AP-19: Document programs in order to make them easier to follow, test, and debug.
  • 3-DA-12: Create computational models that represent the relationships among different elements of data collected from a phenomenon or process.

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.

Lesson contents