Conditional Conveyor

Sort a visible batch using combined conditions and ordered rules.

Grades 3–5 · Computer Science

Explore one idea

Conditional Conveyor

Your goal

Send every package to its shown goal destination. Combine color and size conditions, choose rule order, and run the conveyor. The first matching rule wins.

1 of 3
Six packages on a conveyor with visible goal destinations and ordered sorting rulesRPackage 1GoalreuseuntestedBPackage 2GoalrecycleuntestedRPackage 3GoalreuseuntestedBPackage 4GoalreuseuntestedYPackage 5GoalinspectuntestedYPackage 6Goalinspectuntested1. If color red AND size small, recycle2. If color yellow, inspectOtherwise reuse

Reduced motion is on. The controls still update the scene.

Choose two conditions and their connector. Put the yellow exception rule before or after the recycling rule, then run all six packages.

Package color
Package size
Combine conditions
Rule order

Package details

  1. Package 1

    Color red · Size small

    Goal reuse

    Result not run

  2. Package 2

    Color blue · Size large

    Goal recycle

    Result not run

  3. Package 3

    Color red · Size large

    Goal reuse

    Result not run

  4. Package 4

    Color blue · Size small

    Goal reuse

    Result not run

  5. Package 5

    Color yellow · Size small

    Goal inspect

    Result not run

  6. Package 6

    Color yellow · Size large

    Goal inspect

    Result not run

The same six packages are evaluated on every run. The two displayed rules execute from top to bottom and stop at the first match for each package. Recycling, inspection and reuse are teaching destinations for logic practice, not advice about real waste handling.

Learn with Conditional Conveyor

Conditional Conveyor gives elementary students a visible batch of colored packages to sort with rules. Learners choose a color condition, a size condition, and whether the conditions combine with AND or OR. A separate yellow package inspection rule can run before or after the recycling rule, making rule order and exceptions visible. Running the conveyor evaluates every package and displays its destination beside the goal destination, with accessible package details. Nine distinct target batches let students revise the rules and compare the full batch again, discovering that one changed condition can affect several items at once.

What to look for

Compare AND with OR

AND needs both conditions; OR needs at least one condition.

Order the exception

A yellow package can match both rules, so the first match decides.

Check every package

An edit can change several destinations in the same batch.

For teachers and curious learners

Compare AND, OR and first matching rule behavior. Ask students to predict what will happen, change one setting, and explain what they observe. Learn gives a starting point. Practice and Challenge offer new goals with the same scene.

A fixed six-item batch evaluated by two ordered rules and a default route; the first matching rule wins.

← All simulations