Neural Sync Active
May 2026 Computational Thinking — Quiz 2 pattern atlas
Registry Synced
May 2026 Computational Thinking — Quiz 2 pattern atlas
397 words
2 min read
2026-08-16
Reading compass
Now · The four-pass reading order
Computational Thinking pattern atlas
Scope: May 2026 graded assignments cover weeks 1–4 on disk. Weeks 5–8 extensions add nested loops and tie-breaking — labelled as extension material.
Interactive dissections: Quiz 2 pattern atlas.
The four-pass reading order
- Entities — records, fields, requested output.
- State — counters, sums, flags, extrema (English meaning for each).
- Filter — predicate as a sentence about one record.
- Finish — empty input, ties, off-by-one.
Pattern families
| Family | Weeks | Shapes | Core move |
|---|---|---|---|
| Records & validity | 1 | MCQ, MSQ | Type-check each field before tracing |
| Trace tables | 2–5 | NAT, MCQ | One row per record; update every named variable |
| Predicates & filters | 2–3 | MCQ, MSQ | AND/OR/exceptions in plain English |
| Interpretation & bugs | 4–8 | MSQ, MCQ | Final variable must translate to a sentence |
Week 2 — medium: counter after predicate
Shape: NAT — final count after scanning a list.
| Record | Predicate | count after |
|---|---|---|
| init | — | 0 |
| each row | test ≥ vs > | +1 only when true |
Trap: Using
> when the spec says ≥.Week 3 — medium: running mean
Maintain sum and count together. After k valid records:
mean = sum / count. Never overwrite mean with the latest value.Trap: Dividing before all records are processed.
Week 4 — hard: buggy else branch
If the spec says “count qualifying records”, a branch that decrements on failure is almost always wrong. Trace empty input — count should stay 0.
Week 4 — easy: what does X mean?
Translate the final variable: total rupees vs number of records vs average. If you cannot say it in one English sentence, do not trust the output.
Extension week 6 — nested loops
Outer visits × inner visits = product, not sum. Draw a tiny 2×3 grid and count inner body executions.
Extension week 8 — tie-break
When comparing groups, confirm whether the spec uses total, count, or average. Ties need an explicit secondary rule (e.g. lexicographic code).
Study loop
Linked References
Ref [1]
Computational Thinking · Week 1 — Variables & representation
Ref [2]
Computational Thinking · Week 2 — Iteration & selection
Ref [3]
Computational Thinking · Week 3 — Procedures & parameters
Ref [4]
Computational Thinking · Week 4 — Nested iteration
Ref [5]
Computational Thinking · Week 5 — Lists & insertion sort
Ref [6]
Computational Thinking · Week 6 — Tables & dictionaries
Ref [7]
Computational Thinking · Week 7 — Graphs & matrices
Ref [8]