Skip to content
Your progress

Checking your sign-in…

Who's learning?

Each profile keeps its own read lessons, badges, streak, and practice scores on this device.

Lesson 10 of 11

8 min

Text size

Eight lessons, one line each. Keep this table open beside the board while you answer.

The four jobs and the write-up's two questions, one line per lesson
IdeaThe line to keep
The plan, in plain wordsSplit a big task into small, named jobs. This project has four: collect, decide, order, report. Each job does one thing.
Collect the dayCollect 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 twoSquare 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 boardEvery 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 classifierMeasure 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 wrongStep 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 reportCollect, 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 wrongCount 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?

  • Guessing four things that any kite program might need
  • Splitting the big task into parts you already know
  • Copying the four columns of the check-in list

The check-in list holds five today rows and two yesterday rows. What does collect keep?

  • Only the span numbers, with the rest dropped
  • Every row on the list, today's and yesterday's
  • Today's rows, pushed whole: kite, span, tail and day together

Two kites sit at the same span and the same tail. What does distanceSquared say?

  • Zero, because both gaps are zero
  • One, because a distance is never zero
  • No answer, because identical kites cannot be measured

Why is no square root ever taken in the distance?

  • Real distances are always whole numbers anyway
  • A square root would put the kites in a different order
  • The squared total orders kites exactly as the real distance would

On the board, kite A2 sits one square from a dancer example. No example is nearer. What will the classifier say?

  • Steady, because the judge's true word for A2 is steady
  • Dancer, because the nearest example's word is the answer
  • Nothing, because A2 is not on the register yet

In the walk, two examples are equally near, and none is nearer. Which wins?

  • The earlier one in the register: the comparison is strictly `<`
  • The later one, which was compared most recently
  • Neither: the walk stops and reports an error

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 comparison in the walk, which must have measured the wrong columns
  • Nothing in the code. The register held no steady kite near A2
  • The collect loop, which should have kept yesterday's rows too

The pipeline is assembled as report, then collect. Decide and order are left out. What prints?

  • The program refuses to start until the jobs are in order
  • A sheet listing yesterday's kites
  • A sheet with zero kites and an empty tally, with no error

Kites A1 and A2 both measure 4 tail. Where do they land on the sheet?

  • A1 stays ahead, because no kite behind it has a shorter tail
  • A2 goes first, because it came in later on the check-in list
  • They are shuffled, because kites with equal tails have no fixed order

Under the narrow register, steady scores 2 of 3. Dancer scores 2 of 2. What does that shape point at?

  • The classifier is weak overall and needs rewriting
  • The dancer examples sit in the wrong corner of the board
  • The miss lives in the steady group: the homemade kite

The register goes from narrow to wide. The counts are recomputed from fresh runs. What changed underneath?

  • The classifier was rewritten with a different sign in its tie rule
  • Only the examples. The walk and the check-in list stay the same
  • The kites were remeasured with a different unit

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?

  • A and R are true, and R explains A.
  • A is false, but R is true.
  • A is true, but R is false.

Case: Kite B1 sits at span 4, tail 6. R2 sits at 3, 8. R3 sits at 1, 6. Which is nearer to B1?

  • R2: squared distance 5, against 9 for R3
  • R3, which shares B1's tail
  • Neither: they are equally near

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.

Reveal every answer to finish this lesson.