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

## Chapter 9 — Width 14 does not edit the address

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

Lesson 09. Map, example, EX055.

```mermaid
flowchart TD
  S["String from requested"] --> W["Format width 14"]
  W --> L["Spaces after the digits"]
  L --> V["Verdict after one more space"]
```

The width pads the column. `ip_address` already ran on the unpadded string.

### Logical drawing

```text
format field {t:14}
  192.0.2.5     is 9 characters
  192.0.2.130   is 11 characters
  198.51.100.7  is 12 characters
pad
  spaces, not digits
```
<!-- open-cyber-academy:lesson-figures:end ch-09 -->

### Learning outcomes

After this chapter, you should be able to:

1. Say what `{t:14}` changes on the line.
2. Count the characters in `192.0.2.130` before padding.
3. Refuse a reading that treats the spaces as part of the address.

### 9.1 The format width is a column. The address object is already built.

Each pass prints `f"{t:14} {verdict}"`. For a string, `:14` means a width of at least 14, aligned to the left. `192.0.2.5` has 9 characters, so five spaces follow it inside the field. `192.0.2.10` has 10. `192.0.2.130` has 11. `198.51.100.7` has 12. A further space, the one written between the field and `{verdict}`, separates the column from the words.

Those spaces are not fed back into `ip_address`. The membership tests used the original string. Changing the 14 would move the verdict column. It would not move `.130` into the network, and it would not take `.10` out of the set.

| String | Characters before padding | What the width adds |
|---|---:|---|
| `192.0.2.5` | 9 | Spaces to reach 14 |
| `192.0.2.10` | 10 | Spaces to reach 14 |
| `192.0.2.130` | 11 | Spaces to reach 14 |
| `198.51.100.7` | 12 | Spaces to reach 14 |

### 9.2 Worked example

| Offered claim | What the format did | Decision |
|---|---|---|
| "The gaps line the verdicts up." | Left pad to 14, then one space | Keep |
| "The address grew extra zero digits." | Only spaces were added | Refuse |
| "A shorter field would have changed `EXCLUDED`." | The word was chosen earlier | Refuse |

> **Synthetic case.** Width 14 is presentation. The four verdicts were already chosen.

### Errors and limits

Do not read a space in the column as a digit of the address.

### Apply

- **EX055 — Column width.** What does `{t:14}` change, and what does it leave alone? *Rubric:* 3 = it pads each stored string out to 14 characters with spaces; the address tested by `ip_address` is unchanged; the verdict word is unchanged;; 2 = the spaces are padding and not a new address;; 1 = one fact;; 0 = none.

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

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

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

## Worked answers

<a id="answer-ex055"></a>
**EX055.** `{t:14}` pads the stored string with spaces out to 14 characters. `ip_address` already used the unpadded string. The verdict word is unchanged.
