<a id="ch-14"></a>

## Chapter 14 — Four ticks are not a printed fraction

<!-- open-cyber-academy:lesson-figures:start ch-14 -->
### Lesson map

Lesson 14. Map, example, EX060.

```mermaid
flowchart TD
  D["Five Booleans in insertion order"] --> M["x when true, space when false"]
  M --> S["Sum of the true values is 4"]
  S --> Q{"Does the script print 4 of 5?"}
  Q -->|No| K["Leave 4 of 5 as a label beside the lines"]
```

The fraction is arithmetic. The page shows brackets.

### Logical drawing

```text
[x] official source used
[x] hash matches vendor
[x] backup taken
[x] tested on staging copy
[ ] admin accounts use MFA
true values: 4    keys: 5    printed fraction: none
```
<!-- open-cyber-academy:lesson-figures:end ch-14 -->

### Learning outcomes

After this chapter, you should be able to:

1. Count the true values without replacing the print.
2. Explain the bracket as a one-character flag.
3. Keep dictionary order distinct from importance.

### 14.1 Insertion order prints five lines. The sum is not one of them.

`checks` is a dictionary of five strings to Booleans. Python 3.7 and later preserve insertion order. This file does not sort the keys. The loop prints `[x]` when the Boolean is true and `[ ]` when it is false, then the key. Four values are `True`. One is `False`. Someone may write "four true, five keys" in the margin. The loop's own page never contains that fraction, a slash form, or a percentage.

The false key is last because it was written last, not because multi-factor sign-in was judged the least important. Moving that key to the top of the dictionary would move its blank bracket. The published file does not move it. A quality, a duration, or a witness cannot be stored in a Boolean. The `x` does not say how the hash was obtained, and the blank does not name a person.

Decan et al. (2018) study vulnerabilities across a package network. Their counts are not these five Booleans. SSDF (NIST SP 800-218) groups secure-development practices. This dictionary is not a scored SSDF assessment. OWASP ASVS is likewise not scored. The five lines remain five lines.

| Key, in written order | Boolean | Bracket |
|---|---|---|
| official source used | True | x |
| hash matches vendor | True | x |
| backup taken | True | x |
| tested on staging copy | True | x |
| admin accounts use MFA | False | space |

### 14.2 Worked example

| Offered summary | Relation to the print | Decision |
|---|---|---|
| Four `x` brackets and one blank | The five Booleans | Keep |
| "4 of 5" written beside the lines and marked as a count | Not a line the script prints | May stay if labelled |
| "The script's last line is `4 of 5`." | The last line is the blank MFA bracket | Refuse |
| "The blank is last because it matters least." | It is last because of insertion order | Refuse |

> **Synthetic case.** The five keys are the whole checklist.

### Errors and limits

Label derived counts as counts. Do not slide them into the output.

### Apply

- **EX060 — Beside, not instead.** Someone replaces the five bracket lines with the single sentence `4 of 5` and says the blank is last because it is the least important check. What may a count do, and why is the blank last? *Rubric:* 3 = 4 true values out of 5 keys may be labelled beside the print; the script does not print that fraction; the blank is last by insertion order; the five lines stay;; 2 = the brackets stay and the fraction is not the output;; 1 = one line;; 0 = none.

<!-- open-cyber-academy:chapter-navigation:start ch-14 -->
### Continue studying — lesson 14 (chapter 14 of 20)

[← Chapter 13](#ch-13) · [Course chapter index](../SUBJECTS.md) · [Chapter 15 →](#ch-15)

Continue to the next authored lesson.
<!-- open-cyber-academy:chapter-navigation:end -->

## Worked answers

<a id="answer-ex060"></a>
**EX060.** Four true values and five keys may be labelled beside the brackets. The script does not print `4 of 5`. The blank bracket is last because that key was written last.
