Download week15.py, save it in an exercise folder, and run python week15.py --lesson 2. This single practice executes two trusted fixed functions in a temporary workspace. It requires no packages or model and finishes within seconds on a small processor. The wrong function returns list length; corrected returns the sum. No arbitrary generated source is executed.
The initial assertion uses [1, 1], intentionally showing a false approval. The stronger cases are [2, 5] expecting 7, an empty list expecting 0, and [-2, 3] expecting 1. all evaluates whether every case comparison is true. The loop increments attempts, checks each candidate, and uses break to stop immediately after acceptance.
The correct implementation is selected on attempt 2. The script then writes a result artifact, computes its digest, changes the file, and asserts that the digest differs. Expected output states that independent cases rejected count-as-sum, the two-attempt loop stopped, and the changed artifact invalidated review. The exercise combines correction and identity into one workflow rather than adding a separate coding assignment.