CHECKPOINT 1 PRACTICE SET  -  ANSWER KEY
Try every item before you read this. Every output below came from a real run.
Captured with Python 3.13. On 3.11 and 3.12 the marker lines under the code in a traceback differ; line numbers and the last line do not.

P1 — Mechanism
  (a) Each run turns the prompt into tokens, computes a probability distribution over the next token, samples one, appends it and repeats. Sampling can pick a different token at any step, and every later token then follows from different text.
  (b) No. Agreement means one continuation is highly probable. Probable is not the same as true: a plausible wrong answer can be the most likely continuation every time. Only a check against an authority settles it.
        Standard | Example answer and why
        Meets | "It samples from a probability distribution each token, so runs differ. If they all agree, that just means the answer is very likely text, and a likely wrong answer stays wrong. You still have to check it."
        Partly | "There's randomness. Getting the same answer five times is a good sign." Mentions randomness without the mechanism and accepts consistency as evidence.
        Misses | "It gives the same answer when it's sure, so yes." Gives the model a certainty it does not have.

P2 — Mechanism (three circles)
  (a) Training data: a widely published fact.
  (b) Context: the email is in this chat, so it is sent with the question.
  (c) Inaccessible: private and recent, so not in the training data and not in the chat. Any answer is invented.

P3 — Predict the output
    Captured run: L18_practice_p3.py (Python 3.13):
        50
        10
        2.5
  Line 3 joins two strings. Line 5 uses /, which always gives a float and keeps the fractional part, so 5 / 2 gives 2.5. An answer of 2 drops the .5, so that line is wrong.

P4 — Trace a loop
  (a) Trace table:
        minutes | minutes >= 60 | count | total
        40 | False | 0 | 0
        75 | True | 1 | 75
        90 | True | 2 | 165
        30 | False | 2 | 165
  (b) Captured output:
    Captured run: L18_practice_p4.py (Python 3.13):
        2 165

P5 — Read a traceback
  (a) Line 2, return part / whole * 100, inside percent. It is the last frame in the traceback.
  (b) whole is 0, and dividing by zero is not allowed. The 0 came from assigned = 0 on line 6, passed in on line 7.
  (c) Either answer meets the standard if it is defended. The call passes a value that makes no sense (zero assigned). But the function also has no rule for that case; a specification for percent should say what happens when whole is 0. That is a specification gap, and naming it is the strongest answer. "The function, because that is where the error is" does not meet it: the traceback location is the symptom, not the defence.

P6 — Method
  (a) For example: what counts as late (one minute? after the shift has started?); what "too often" means (how many times, over what period); whether an excused lateness counts; whether exactly at the threshold is flagged.
  (b) For example: too_often(times_late, limit) returns True or False. (2, 3) -> False. (3, 3) -> True; reaching the limit is "too often" (stated assumption). (0, 3) -> False.
        Standard | Example answer and why
        Meets | A signature with named inputs and a return; three criteria with specific inputs and results; the boundary case named and its side stated.
        Partly | A signature, plus criteria like "returns True if too late". A testable direction, but no specific inputs and no boundary.
        Misses | "It should flag the right people." Nothing testable.

P7 — Verification
  (a) The claim is that the output is the numbers 1 to 10. The authority is running the program, or a careful trace of it, not the model's description.
  (b) No. range(1, 10) stops before 10, so it prints 1 to 9: nine lines, not ten.
    Captured run: L18_practice_p7.py (Python 3.13):
        1
        2
        3
        4
        5
        6
        7
        8
        9
