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.
Try it yourself
Before ordering the blocks, predict what badge a score of 92 receives if the flowchart checks score >= 60 first.
| Case | Result |
|---|---|
| score = 92 (ordered: >= 90, >= 75, >= 60) | Select a choice above to see what happens. |
| score = 92 (wrong order: >= 60, >= 75, >= 90) | Select a choice above to see what happens. |
| score = 75 (ordered: >= 90, >= 75, >= 60) | Select a choice above to see what happens. |
Reveal the explanation
- score = 92 (ordered: >= 90, >= 75, >= 60)
Gold
- score = 92 (wrong order: >= 60, >= 75, >= 90)
Bronze (shadowed bug)
- 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
This browser could not save your progress. Changes last until you leave the page.