Lesson map
Lesson 16. Map, example, EX062.
flowchart TD
V["Three vectors, length 6"] --> Z["zip by index"]
V --> S["sum over the denominator len of tasks"]
Z --> M["Miss names"]
S --> R["3/6, 5/6, 6/6"]
M --> Q{"Does a 1 store how well the task was done?"}
Q -->|No| K["Keep the bits as bits"]
Alignment is an assumption that holds for these three vectors.
Logical drawing
May: [1, 1, 0, 0, 1, 0] -> 3/6
June: [1, 1, 1, 0, 1, 1] -> 5/6
July: [1, 1, 1, 1, 1, 1] -> 6/6
causes such as "nobody knew how" are not cells
Learning outcomes
After this chapter, you should be able to:
- Align each zero with a task name by index.
- State the denominator the print uses.
- Refuse a quality story stored in a
1.
16.1 The print names a miss. It does not store a cause.
tasks has six strings. Each month maps to a list of six integers, only 0 or 1 in this file. sum(done) is the numerator. The denominator is len(tasks), which is 6, not the length of the vector. zip pairs names with cells by position and stops at the shorter sequence. All three vectors have length 6, so the names and the sums see the same cells. That equal length is true of this file. The script does not check it.
May's zeros sit at indexes 2, 3, and 5: restore, image, notices. June's only zero sits at index 3: image. July has no zero, so the miss clause is omitted. A 1 means the cell was truthy. It does not store minutes, a witness, or a document. The prose causes — nobody knew how to restore, the developer was away — are sentences beside the vector. Shifting a bit would rename a miss without a new measurement. No shifted vector is in the file.
The sharing script is a different instrument. A passing storage triple does not set a routine bit, and a routine 1 does not edit a triple.
16.2 Worked example
Lesson table; scroll horizontally to read all columns →
| Statement | Computed? | Decision |
|---|---|---|
| June missed only the image task | Index 3 is the only zero | Keep |
| The denominator is 6 | len(tasks) |
Keep |
| "June's restore 1 describes a perfect restore." | The cell stores no quality | Reject |
| "The vectors were shifted to match the story." | Length and positions stay | Reject |
Synthetic case. May, June, and July are the only keys.
Errors and limits
Do not promote a cause sentence into a seventh cell.
Apply
- EX062 — Bits and names. Someone says June's image cell failed because the bit stores the holiday, and that a restore value of 1 is a measured perfect restore. What does the vector hold?
Show marking criteria
Rubric: 3 = cells are 0 or 1; June's only zero is index 3, the image task; the holiday and the restore quality stay prose; the denominator stays 6; the three vectors stay length 6;; 2 = the miss is the image bit and the causes stay outside;; 1 = one cell;; 0 = none.