CHAPTER 10 VISUAL LAB - Look up a field without inventing missing data
Book boards: 10a and 10b

PRACTICE ROUTINE
Cover the board answer. Predict aloud, try the example, compare with the
stated result, change one input, and try again. Explain a discrepancy
before changing another thing. All marketing examples are fictional.

Use boards 10a and 10b. Open walkthrough.py in Thonny and press F5. It keeps
the complete and incomplete examples in separate dictionaries for inspection.

EXPECTED OUTPUT
Spring search
300
25.0
Unassigned
Missing enquiry field; check the source.

FOLLOW THE CODE
The dictionary keys name facts about one campaign. Square brackets retrieve
a required value from that dictionary. get supplies an honest label when
the optional owner is absent. The in comparison checks key presence without
inventing an enquiry count for the incomplete record.

CHANGE, PREDICT, CHECK
In a practice copy, add "enquiries": 0 to incomplete_campaign. Predict the
last line before running.
Answer: An enquiry field is present. This establishes presence only. A rate
with a zero denominator remains unavailable; a missing key and a known zero
are not equivalent facts.

SECOND CHANGE
Change the complete campaign's enquiries from 12 to 15. Its printed rate
becomes 20.0 when the division runs again. Its name and cost remain unchanged.
Explain each brace, colon, comma and square bracket using the meanings from
the chapter. The full reference python/chapter10.py loops over three complete
records and accumulates EUR 620 and thirty enquiries.
