Lesson 5

Tracking the score

This lesson introduces variables as a way to track values in a program. Students learn how to create and name variables in a program. They modify their existing ‘Taking a tour’ program to include a score variable. This variable will reset when the green flag is clicked and increase in value when a user gets a correct answer. To conclude the lesson, students work through a testing checklist to make sure their program runs as intended.

school
Grade 5
local_library
Subject Social studies
schedule
Length of lesson 50 minutes

Learning objective

Students will use a variable to store a changing value based on user input.

Standards

CSTA Standards

  • 1B-AP-10: Create programs that include sequences, events, loops, and conditionals
  • 1B-AP-11: Decompose (break down) problems into smaller, manageable subproblems to facilitate the program development process.
  • 1B-AP-15: Test and debug (identify and fix errors) programs.