Curriculum

Curriculum

Order Multi-Branch Thresholds Without Shadowing

Scenario

A classroom quiz scorer awards badges by percentage: Gold for 90 or higher, Silver for 75 or higher, Bronze for 60 or higher, and Retake below 60.

Selected choicePick a choice below
Result—

Try it yourself

Before ordering the blocks, predict what badge a score of 92 receives if the flowchart checks score >= 60 first.

Reveal the explanation
  1. score = 92 (ordered: >= 90, >= 75, >= 60)

    Gold

  2. score = 92 (wrong order: >= 60, >= 75, >= 90)

    Bronze (shadowed bug)

  3. score = 75 (ordered: >= 90, >= 75, >= 60)

    Silver

Cascading threshold branches form a funnel from strictest to loosest. Checking >= 90 first isolates 90..100, so the next check >= 75 only receives scores below 90, and >= 60 only receives scores below 75.

Download shared test cases

Your turn

Order a library late-fee tier flowchart from highest to lowest daysLate: 30+ days -> Account Frozen, 14+ days -> High Fee, 1+ days -> Small Fee, 0 days -> On Time.

Common mistake Checking daysLate >= 1 first, which traps 15 days and 35 days inside Small Fee.

Check your work

A four-step decision chain ordered daysLate >= 30, then >= 14, then >= 1, with 0 falling to On Time.

Quick check

Why should cascading >= thresholds in a flowchart be checked from highest to lowest?
Show the answer and reasoning

Correct answer Because an earlier lower threshold is also true for higher values and shadows the stricter branches.

Every number >= 90 is also >= 60. If >= 60 comes first, it captures 90+ scores and prevents later branches from ever running.