Lesson map
Lesson 07. Map, example, EX053.
flowchart TD
A["Two synthetic hour strings"] --> B["match: False"]
B --> C{"Did the library change its hours?"}
C -->|No| D["Keep the strings and False"]
C -->|Yes| E["No timetable decision is filed"]
The inputs are laboratory text. They are not a new opening-hours policy.
Logical drawing
string A ends 9-17
string B ends 9-18
prints
A: 7a5d91566f93af7abf7fc2c33d868004...
B: c029501271e71ec3fc765840b69dfabd...
match: False
library timetable
not stated by those strings
Learning outcomes
After this chapter, you should be able to:
- Keep the two hour strings and
match: False. - Keep each printed prefix with its dots.
- Refuse to treat the strings as the library's timetable.
7.1 One character apart, and still not a policy.
The fingerprint script sets string A to Willow Lane opening hours: 9-17 and string B to Willow Lane opening hours: 9-18. The embedded output shows A: 7a5d91566f93af7abf7fc2c33d868004..., B: c029501271e71ec3fc765840b69dfabd..., and match: False. Each print is a 32-digit prefix plus dots, just as ha[:32] and hb[:32] are written. A classmate who needs a tidy story says the library now closes at 18:00, or edits the script until the match line says True. The book never states the library's real hours. The two strings exist so a single character change can be seen. Leo leaves False on the page and does not promote either string into a timetable decision.
7.2 Worked example
Lesson table; scroll horizontally to read all columns →
| What someone cites | What the file holds | Decision |
|---|---|---|
String A ending 9-17 |
Laboratory input | Keep the input |
String B ending 9-18 |
Laboratory input | Keep the input |
match: False |
Embedded output | Keep False |
| "The library adopted 9-18." | No hours decision | Refuse |
Synthetic case. The hour strings are inputs to a hash. They do not set the door time.
Errors and limits
Leaving False in place does not hide that the prefixes differ. It refuses a True the script did not print.
Apply
- EX053 — New hours? The laboratory strings end
9-17and9-18, and the output saysmatch: Falsewith the two published prefixes. May Leo report that Willow Lane changed its opening hours?Show marking criteria
Rubric: 3 = no; both strings stay; both prefixes stay with their dots;match: Falsestays; the strings are not a timetable; do not editlab_fingerprint.py;; 2 = False stays and the hours are not a policy;; 1 = one prefix;; 0 = none.