OpenCyber Academy
Rapid course · Lesson 6 · English
Course code: OCA-004Lesson 06: OCA-004-A006

Five fields on the form are not a new lab print

Open, free learning for anyone who wants to protect people and technology. No account is required to read this text or its worked answers.

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:

  1. Keep the published ten-field output as the count of that file.
  2. Reject a replacement print of five collected and none unneeded.
  3. 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 10 and not 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

Worked answers

EX060. Neither 5 collected nor 0 unneeded was the published run. The verified print remains 10 collected and 5 not needed, 50 percent. Do not edit the script.