Color Cargo Sorter
I can scan cargo and use IF / ELSE to sort a mixed batch.
Your activities & worksheet
A queue of color-coded cargo has arrived. Scan each item and use a condition to send it to the correct bin. Work with a partner, swap roles, and record your own thinking.
How does one condition choose the correct cargo bin?
Activity 1 · Inspect the first parcel
- Open Color Cargo Sorter. The first cargo is RED.
- Run Scan, then Send BLUE right. Predict and observe the wrong-bin feedback.
Activity 2 · Sort the whole queue
- Use Repeat 4 containing Scan and IF cargo RED. Put Send RED left in THEN and Send BLUE right in ELSE.
- Trace RED, BLUE, BLUE, RED; predict exactly one branch per parcel, then complete the batch.
Activity 3 · Find a branch error
- Swap the two sorting actions and predict the first failure.
- Run, locate the first wrong bin in the trace, restore the branches, and retest.
Individual exit check
Can both sorting branches run for the same scanned parcel?
Teach this lesson
A 50-minute plan with preparation, prompts, model responses, differentiation, and an individual assessment.
How does one condition choose the correct cargo bin?
| Planning element | Teacher notes |
|---|---|
| Learning target | I can scan cargo and use IF / ELSE to sort a mixed batch. |
| Evidence of learning | Sort four items: RED goes left; BLUE goes right. Use a loop and IF / ELSE. Keep individual predictions, observations, and an explanation; a completion badge alone does not establish mastery. |
| Standards focus | 2-3.CT.8; 4-6.CT.7, 4-6.CT.8, 4-6.CT.9. |
| Vocabulary | IF, ELSE, branch, scan, color input, queue |
| Readiness | Follow a short sequence and use a grid. Revisit the previous week’s prediction and explanation before introducing this game. |
| Preparation | Open game-week-05.html (Color Cargo Sorter). Check the sorting-arm robot and Candy Color Sortworks scene. Prepare a 5-by-5 grid, arrow counter, and worksheet. Use one device per pair and review the goal before revealing a solution. Game awards and worksheet responses save locally on this device; use teacher records for assessment. |
50-minute lesson sequence
| Minutes | Teaching moves | Look for |
|---|---|---|
| 0-5 | Introduce the mission Read the story and goal. Ask: How does one condition choose the correct cargo bin? Identify what must be observed to verify success. | Learners restate the task and constraints. |
| 5-12 | Model one action or test Demonstrate one control without solving the whole game. Explain the difference between robot heading and camera view. Ask for a prediction before clicking Run. | Each learner names an input, expected action, and observable result. |
| 12-20 | Activity 1: Inspect the first parcel Open Color Cargo Sorter. The first cargo is RED. Run Scan, then Send BLUE right. Predict and observe the wrong-bin feedback. Ask pairs to trace with a counter before retesting. | Collect the first worksheet prediction and observation. |
| 20-35 | Activity 2: Sort the whole queue Use Repeat 4 containing Scan and IF cargo RED. Put Send RED left in THEN and Send BLUE right in ELSE. Trace RED, BLUE, BLUE, RED; predict exactly one branch per parcel, then complete the batch. Swap driver and navigator after one run. Pause at the first unexpected state. | Both partners connect a block, label, or parameter with the observed result. |
| 35-43 | Activity 3: Find a branch error Swap the two sorting actions and predict the first failure. Run, locate the first wrong bin in the trace, restore the branches, and retest. | A revision or comparison is supported by a recorded test. |
| 43-48 | Independent exit check Ask each learner: Can both sorting branches run for the same scanned parcel? Allow a spoken answer, drawing, or written response without a partner supplying the explanation. | Use the model answer as a guide; accept other explanations grounded in the run. |
| 48-50 | Save evidence and reflect Record completion and a next teaching step. Ask learners to download their worksheet or use a teacher-approved classroom record. | A next test or remaining limitation is named. |
Model program and expected behavior
repeat 4 { scan; if RED { send left } else { send right } }Four scans and four bin actions sort RED, BLUE, BLUE, RED into left, right, right, left. A repeat loop and IF RED / ELSE are required. Every new parcel must be scanned; a previous parcel’s label cannot substitute.
2D teaching reference
Columns run west to east; rows run north to south. S = start, G = goal, M = mission item, X = barrier, P = route. Start heading: east. Use counters and this grid as an alternative to interpreting the 3D view.
| Grid | C1 | C2 | C3 | C4 | C5 |
|---|---|---|---|---|---|
| R1 | . | . | . | . | . |
| R2 | . | . | P | . | . |
| R3 | . | P | SG | . | . |
| R4 | . | . | P | . | . |
| R5 | . | . | . | . | . |
Misconceptions and a useful response
| Misconception | Response |
|---|---|
| Both branches run on each item. | Physically choose one of two bins for a single card. Trace only the branch selected by the scanned color. |
| Finishing the game proves I understand everything. | Ask for an individual prediction, trace, explanation, and a next test. Use completion as one piece of evidence. |
Differentiate the task
Support: Provide colored paper parcels and two labeled bins before the digital run. Read labels aloud; color is also written in text. Provide the written position/heading status and a 2D or tactile map when the 3D view is not useful.
Extend: Compare four explicit scan-and-sort pairs with the conditional routine. Explain why the conditional is reusable for a changed color order.
Independent exit check
Prompt: Can both sorting branches run for the same scanned parcel?
Teacher key: No. IF / ELSE selects one branch. A RED label chooses left; a BLUE label chooses right.
Connect to Scratch or physical robotics
In Scratch, represent color input with a variable or color sensor probe and use IF / ELSE. The simulator’s labels are authored task inputs, not camera recognition or AI.