Teaching article

Test the value on the boundary of the sorting rule

Try examples near the rule's boundary.

A rule saying greater than five behaves differently from one saying at least five. Include five itself in the test set so the distinction becomes observable instead of remaining hidden among easy examples.

To hand: Number cards and a greater-than-five rule.

  1. Test a typical value.
  2. Test five itself.
  3. Test a value below.

The boundary case is informative

Include an example exactly on the boundary. This is where otherwise similar rules such as greater-than and at-least produce different results.

Five does not satisfy 'greater than five'.

Greater than and at least differ. What happens at the boundary?

Use a number line.

Resources

Further reading

Read next

Explore Coding and computational thinking. Browse all teaching articles.