Track quiz
Eight lessons, one line each. Keep this table open beside the board while you answer.
| Idea | The line to keep |
|---|---|
| The plan, in plain words | Split a big task into small, named jobs. This project has four: collect, decide, order, report. Each job does one thing. |
| Collect the day | Collect walks the list and keeps today's rows. A row is kept whole or skipped whole. The day column says which one it is. |
| The distance between two | Square the gap across, square the gap up, add them. The sum orders kites exactly as a real distance would. Two kites at the same spot measure zero. |
| See the board | Every kite is one point by its two measurements. The nearest example is the one measuring least. Seeing the nearest one shows the reason for its word. |
| Write the classifier | Measure every example and carry the nearest one so far. A new example wins only when it is strictly nearer. Ties keep the example met first. |
| When the nearest is wrong | Step the wrong kite through your own function. The nearest example truly is nearest, but it carries the wrong word. The code is right; the register held no steady kite nearer. |
| Assemble and report | Collect, decide, order, report — the order matters. A job run too early has nothing to work on. The sheet shows exactly what the order produced. |
| Who it gets wrong | Count the right answers once per group, with each group's own total. Then ask what the register never held. One total can hide a miss in one group. |
The mela's program has four jobs. Where did the four names come from?
The check-in list holds five today rows and two yesterday rows. What does collect keep?
Two kites sit at the same span and the same tail. What does distanceSquared say?
Why is no square root ever taken in the distance?
On the board, kite A2 sits one square from a dancer example. No example is nearer. What will the classifier say?
In the walk, two examples are equally near, and none is nearer. Which wins?
Kite A2 is homemade, and the register's eight examples are all shop-bought. The program calls A2 dancer, but its true word is steady. What went wrong here?
The pipeline is assembled as report, then collect. Decide and order are left out. What prints?
Kites A1 and A2 both measure 4 tail. Where do they land on the sheet?
Under the narrow register, steady scores 2 of 3. Dancer scores 2 of 2. What does that shape point at?
The register goes from narrow to wide. The counts are recomputed from fresh runs. What changed underneath?
Assertion (A): Add a steady kite one square from A2, after R5. A2 then turns steady. Reason (R): A tie keeps the example met first. What is right?
Case: Kite B1 sits at span 4, tail 6. R2 sits at 3, 8. R3 sits at 1, 6. Which is nearer to B1?
That is the track: four jobs, one rule, one sheet. A write-up knows its own blind spot.
You walked in with pieces. You walked out with a program. Keep the two questions for the next register you meet.