Lesson map
Lesson 06 published. Map, example, EX060.
flowchart TD
P["Published run: 10 collected, 5 not needed"] --> F["A later form asks for five names"]
F --> R{"Was the ten-name file rerun?"}
R -->|No| K["Do not print 5 collected and 0 unneeded"]
R -->|Yes| N["Record that run on its own line"]
A shorter form is not a rewrite of the first count.
Logical drawing
lab_loyalty.py on the original list
fields collected 10; not needed for any stated purpose 5 (50%)
two-week form
five names, a different object
|
+-- 10 minus 5 is arithmetic, not a new execution
+-- the five rejected names stay the finding about the first file
+-- the script's collected list is not edited
Learning outcomes
After this chapter, you should be able to:
- Keep the published ten-field output as the count of that file.
- Reject a replacement print of five collected and none unneeded.
- Leave the program's list of names unchanged.
6.1 The form changed. The first file did not.
The two-week sign-up asks for five names. That is a check of a later form. The script's print describes the synthetic list of ten names, five of which sit in no purpose set: phone, postcode, prescription items, gender and the location trail. A classmate replaces the lab note with "fields collected 5; not needed 0". Subtracting the rejected names from ten does not execute the program again. Sofia keeps the published lines. If someone runs the script on a new list, that run gets its own line. This lesson does not perform that run, and it does not delete names from collected.
6.2 Worked example
Lesson table; scroll horizontally to read all columns →
| Proposed lab note | What was actually run | Decision |
|---|---|---|
| "10 collected; 5 not needed (50%)." | The published file | Keep it |
| "5 collected; 0 not needed." | No new execution | Refuse |
| "Phone is needed now because the form once had it." | The first file marked phone NOT NEEDED | Refuse |
Edit collected so the next print is shorter |
A change to the teaching file | Refuse |
Synthetic case. The lines
fields collected 10andnot needed for any stated purpose 5 (50%)stay the published run.
Errors and limits
A later form can still fail, which Chapter 18 takes up if a rejected name reappears. This chapter does not claim the five-field form is lawful for every purpose.
Apply
- EX060 — Do not replace the print. Someone writes "this month: 5 fields collected and 0 not needed" because the sign-up form was shortened. What is wrong with both numbers, and which print remains the verified one?
Show marking criteria
Rubric: 3 = neither 5 collected nor 0 unneeded was the published run; the verified print is still 10 collected and 5 not needed, 50 percent; do not edit the script;; 2 = reject the new pair and keep the published print;; 1 = one number;; 0 = none.