HelioLearnSkills for every stage

GRADE 5 · COMPUTATIONAL THINKING · ABOUT 40 MINUTES

Track a changing variable

Update a value in an ordered sequence.

Understand the idea

A variable holds a value that can change. Each new calculation uses the current value.

WORKED EXAMPLE

Set score = 2. Add 3, then double, then subtract 1: 2 → 5 → 10 → 9.

Watch it step by step

Step 1 of 4
TRACE THE STATE · READ THE EXPLANATION BELOWStep 12Step 2…Step 3…Step 4…Each state follows the specific rule in this workedexample.

Set

score = 2.

Choose Play to advance steps automatically.

Read or choose any step
  1. Set

    score = 2.

  2. Add

    score = score + 3, so score is 5.

  3. Double

    score = score × 2, so score is 10.

  4. Subtract

    score = score - 1, so score is 9.

TRY BEFORE CHECKING

Exercises with feedback

Enable JavaScript for feedback, or use the printed exercises.

MAKE SOMETHING YOU CAN EXPLAIN

Your practical challenge

Make a variable trace table for the example. Change the starting value and repeat.

Review your evidence

These ticks are your self-review. They do not automatically assess project quality. Ask an adult or partner to review what you can show.

Use the skill in a new situation

Reverse two instructions and compare outcomes.

Choose a different space for another learner on this browser.

Notes and checks use this browser, separate from school sign-in.

Each space keeps each grade separate. These spaces are not private accounts; use separate browser profiles for privacy on a shared device. About your practice data

Next: Check source, date and relevance →All six experiences