Compare AND with OR
AND needs both conditions; OR needs at least one condition.
Sort a visible batch using combined conditions and ordered rules.
Grades 3–5 · Computer Science
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.
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.
Color red · Size small
Goal reuse
Result not run
Color blue · Size large
Goal recycle
Result not run
Color red · Size large
Goal reuse
Result not run
Color blue · Size small
Goal reuse
Result not run
Color yellow · Size small
Goal inspect
Result not run
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.
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.
AND needs both conditions; OR needs at least one condition.
A yellow package can match both rules, so the first match decides.
An edit can change several destinations in the same batch.
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.