Practice review worksheet · about 30 minutes

Review practice attempts and plan the next session

A passing retry tells you what happened on that retry. Keep its input, expected output and help received visible so the next practice task follows from the evidence.

You will review twelve fictional attempts on six small quantity-counter cases. The log supplies the observed outcomes; it is not a real learner record or a report of code executed for this page. Your deliverable is a brief review plus a 45-minute plan. No score here predicts long-term retention or future performance.

1. Read the case-level evidence

For these supplied cases, a valid integer quantity contributes to the total; an invalid quantity contributes to an invalid-row count. Repeated IDs are counted once, using the first occurrence. A row missing the quantity field produces missing_column. Whitespace around an integer is accepted. The exercise does not specify every possible interaction between these rules.

Invented expected results and two attempts on each same input
CaseExpected resultFirst attempt · no hintsRetry on the same input
C1 · quantities 2 and 3Total 5; invalid 0Pass · 3 minPass · no hint · 2 min
C2 · empty listTotal 0; invalid 0Error · 4 minPass · with hint · 3 min
C3 · quantities 2 and xTotal 2; invalid 1Error · 5 minTotal 2; invalid 0 · with hint · 5 min
C4 · quantity field absentmissing_columnPass · 3 minPass · no hint · 2 min
C5 · ID a:2, a:2, b:3Total 5; invalid 0Total 7; invalid 0 · 6 minPass · no hint · 4 min
C6 · quantities “ 1 ” and “2”Total 3; invalid 0Pass · 3 minPass · no hint · 2 min

The download keeps one row per attempt, including its input description, expected and observed output, hint status, first-exposure flag and minutes. C3’s retry still fails because the invalid count is wrong, even though the valid total is now correct.

2. Calculate three different summaries

Try these calculations before opening the answer: first-attempt pass rate, latest outcome per distinct case, and pass rate across every attempt. Explain what each denominator contains.

Worked calculations and their limits
  • First attempts: C1, C4 and C6 passed. That is 3 / 6 = 50%, with no hints on those six first exposures.
  • Latest outcome by case: C1, C2, C4, C5 and C6 passed. That is 5 / 6 ≈ 83.3%. Every latest attempt reused a previously seen input; C2 and C3 used hints.
  • All attempts: 3 initial passes + 5 retry passes = 8 passes in 12 attempts, or 8 / 12 ≈ 66.7%. This mixes initial and repeated work on the same six cases.
  • Recorded time: initial 3 + 4 + 5 + 3 + 6 + 3 = 24 minutes; retries 2 + 3 + 5 + 2 + 4 + 2 = 18 minutes; total 42 minutes.

These are three descriptions of one supplied log. They do not establish a general skill level. The shorter retry total also combines repeated inputs and different support, so use it as recorded time rather than a measured improvement in independent speed.

3. Write a review that distinguishes the evidence

Filled review of all six cases
CasesWhat the log supportsNext action
C1, C4, C6Passed on the supplied first attempts without hintsKeep their input/output checks in the regression set
C2Passed the repeated case with a hintTry an empty-input variant without help before deciding the gap is closed
C3Still has an incorrect invalid count after a hinted retryInspect the invalid-row branch first and save a corrected comparison
C5Passed the repeated case without a hintCheck a different duplicate-ID input; record it as a new attempt

A useful review reads: “Three of six first attempts passed without hints. Five of six latest outcomes passed on repeated inputs. Invalid-row counting remains unresolved; empty-input handling still needs an unaided variation. Next session starts with C3.” This separates the observations from the next hypothesis to check.

4. Allocate the next 45 minutes

The durations and stop rule below are chosen planning conventions. They are not an evidence-based prescription for how long practice must last.

Filled next-session plan with outputs and a stop rule
Minute rangeTaskSaved evidence
0–5Restate the valid-total and invalid-count rulesOne short contract and C3’s expected result
5–17Inspect the invalid-row branch; repair and rerun C3Actual output beside total 2 / invalid 1; record any help used
17–29If C3 passes, try three different input variants, four minutes eachEach input, expected result, actual result and help status
29–39Rerun the original six casesA six-case regression log, including any new failure
39–45Compare the logs and choose one remaining gapA short review and one explicit next task

Total: 5 + 12 + 12 + 10 + 6 = 45 minutes.

Stop rule: if C3 still fails at minute 17, use minutes 17–29 to isolate that failure with one minimal input and save the actual output. Defer the three variants. Keep the regression and review blocks, and report the unresolved result.

Example variants and filled expected results

N1: one row with quantity x → total 0, invalid 1. N2: three different IDs with quantities 4, bad, 1 → total 5, invalid 1. N3: IDs a:2, b:3, a:2 → total 5, invalid 0 because the repeated a is counted once.

These are worked practice examples with supplied answers. If you use them after reading this answer, record that exposure. To investigate transfer to a different input, prepare additional variants and record the expected result before running them. A few successful variants still describe only those checks.

Use the remaining gap to select practice

Use the project evidence rubric to review the saved bundle, and the study-time worksheet to fit the next session into your week. The syllabus comparison can help you find a course assignment that exercises the remaining gap.

Compare learning routes · Create a learning route

Sources and scope

Python’s official unittest reference documents expected-value and exception checks. Its int reference documents integer-string conversion, including surrounding whitespace. These references support the example checks; the attempt log, review categories, time allocation and stop rule are original invented material. Sources checked 25 October 2026.