HelioLearnSkills for every stage

GRADE 9 · COMPUTATIONAL THINKING · ABOUT 50 MINUTES

Test boundaries in a decision

Choose tests on both sides of a threshold.

Understand the idea

Boundary tests check values close to where behavior changes. They help expose mistakes such as using > instead of ≥.

WORKED EXAMPLE

A fictional score rule accepts whole numbers from 0 to 10 and passes scores ≥ 6. Test 5, 6 and 7 after validating the range.

Watch it step by step

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

Rule

The pass threshold is score ≥ 6.

Choose Play to advance steps automatically.

Read or choose any step
  1. Rule

    The pass threshold is score ≥ 6.

  2. Below

    Score 5 fails.

  3. Boundary

    Score 6 passes.

  4. Above

    Score 7 passes.

TRY BEFORE CHECKING

Exercises with feedback

Enable JavaScript for feedback, or use the printed exercises.

MAKE SOMETHING YOU CAN EXPLAIN

Your practical challenge

Write expected outputs for -1, 0, 5, 6, 7, 10 and 11. Separate invalid from valid-but-failing input.

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

Find a test that distinguishes > from ≥.

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: Distinguish AI help from evidence →All six experiences