Lesson map
Lesson 13. Map, example, EX059.
flowchart TD
S["score = likelihood * impact"] --> H{"score >= 6?"}
H -->|Yes| A["high"]
H -->|No| M{"score >= 4?"}
M -->|Yes| B["medium"]
M -->|No| C["low"]
The tests are >=. A 6 is already high. A 4 is already medium.
Logical drawing
F1 6 high
F3 6 high
F4 4 medium
F2 2 low
not in this print
a 5, a 3, a 9
Learning outcomes
After this chapter, you should be able to:
- State the two thresholds.
- Place each printed score in its band.
- Refuse a band the file does not compute for a score it does not hold.
13.1 The band is computed. medium already fills the width.
After the sort, the loop sets score = lik * imp again and then chooses a word. score >= 6 yields high. Otherwise score >= 4 yields medium. Otherwise the word is low. The tests are inclusive. Six is not "almost high." Four is not low.
This print contains 6, 6, 4, and 2. It does not contain 5, 3, or 9. A 5 would be medium and a 3 would be low, but saying the lab printed those bands would add rows. The format {band:6} asks for a width of 6. medium is already six letters, so it receives no extra pad. high is four letters, so two spaces are added inside the field before the separator space. low is three letters, so three spaces are added. The pad is not a second score.
Lesson table; scroll horizontally to read all columns →
| Score in this print | Test that matches | Word |
|---|---|---|
| 6 | >= 6 |
high |
| 4 | not >= 6, then >= 4 |
medium |
| 2 | neither test | low |
13.2 Worked example
Lesson table; scroll horizontally to read all columns →
| Offered claim | Threshold | Decision |
|---|---|---|
| "F4 is medium because 4 meets the second test." | >= 4 after >= 6 failed |
Keep |
| "High starts above 6, so F1 is medium." | 6 passes the first test | Refuse |
| "The lab printed a score of 9." | No tuple multiplies to 9 | Refuse |
Synthetic case. Four products, three words, no extra row.
Errors and limits
Do not lower the 6 so that F1 and F3 become medium.
Apply
- EX059 — Bands. Which scores in this print are high, medium, and low, and what would a 5 be if it existed?
Show marking criteria
Rubric: 3 = 6 is high, 4 is medium, 2 is low; a 5 would be medium because it fails>= 6and meets>= 4; this print has no 5;; 2 = the three printed bands are right and no extra score is claimed;; 1 = one band;; 0 = none.