For Scientific Computing and Reproducible Workflows, TMP-SCI-204. This key belongs to the original fictional Unit 1 packet. It provides formative feedback, not accredited assessment or evidence that a learner executed code. Equivalent clearly justified reasoning is acceptable. Read None as “no observed rate” where appropriate, never as zero.
Readiness
R1
24/40 = 3/5 = 0.6 mL/s. A minute has 60 seconds, so the same rate is 36 mL/min. The numerical value and denominator unit change together; the 24 mL collected and 40-second window do not change. A result of 0.01 mL/min has applied the conversion in the wrong direction. Dimensional check: (mL/s) × (60 s/min) = mL/min.
R2
Zero says a measurement was made and found no volume at the recorded resolution. Missing says the volume was not observed in this packet. Setting the latter to zero invents information and can lower a reported full-period rate. Both rows still contribute their known durations to scheduled time. Only the observed-zero row contributes duration to the observed-rate denominator.
R3
The result is 11. Assignment evaluates the right side using the previous value 8 and then replaces the binding of total with 11. It is an update instruction, not a claim that 8 equals 11. extra remains 3.
R4
Accept any four well-explained items such as question/quantity, units, original input, source version, interpreter/environment, command, inclusion/missingness rules, test expectations and actual run status. A screenshot of 0.64 supplies none of these by itself. “The website looked professional” is not computational evidence.
Guided work
G1
W1 = (30 s, 18 mL); W2 = (90 s, 54 mL); W3 = (60 s, missing); W4 = (20 s, 8 mL), each with its stated distinct ID. Duration and interval volume define each local rate; ID supports traceability and duplicate detection. The question pools only observed-volume windows. Nonoverlap is an assumption the supplied fields cannot check. Repeating an ID may duplicate the same observation, so the narrow contract stops rather than assigning a second contribution. Genuine distinct windows should be resolved from authoritative input, not renamed merely to bypass validation.
G2
Pooled = 80/140 = 4/7 mL/s. Equal-interval mean = (3/5 + 3/5 + 2/5)/3 = 8/15 mL/s. The pooled rate matches total observed volume divided by total observed time. Multiplying 4/7 by 60 gives 240/7 mL/min, approximately 34.286 mL/min. This is a unit conversion, not evidence that a new one-minute interval would collect exactly that amount. The statement about future collection would require a stability assumption not supplied.
G3
Observed IDs W1, W2, W4, W5; missing W3. Volume remains 80 mL. Observed time becomes 160 seconds, scheduled time 220 seconds. Rate is 80/160 = 1/2 mL/s. Coverage is 160/220 = 8/11. Skipping W5 because its volume is zero omits a real observation period and incorrectly leaves 4/7 mL/s. It also misreports which windows were observed.
G4
After W1: volume 18, observed time 30, scheduled time 30; observed IDs [W1], missing []. After W2: 72, 120, 120; observed [W1,W2], missing []. After W3: 72, 120, 180; observed [W1,W2], missing [W3]. After W4: 80, 140, 200; observed [W1,W2,W4], missing [W3].
The empty list returns all totals zero, both ID lists empty and rate None. A single missing row X of 15 seconds returns volume 0, observed time 0, scheduled time 15, observed [], missing [X], rate None. The volume total zero describes the sum over an empty set of observed volumes, not a measured zero-volume interval. With no observed time, the quotient is undefined; the explicit marker avoids dividing by zero or inventing a measurement.
G5
The call raises ValueError with message elapsed_s must be an integer from 1 to 86400. W1 fails before its duration or volume is accumulated, and no report is returned. If the invalid row were later in the list, earlier local totals could have been computed internally, but the function still would not return them. A failed whole call is different from a valid report with zero totals. An actual error log plus the modified input provides execution evidence; a prediction alone does not.
G6
The worked output is 80 mL, 140 observed seconds, 200 scheduled seconds and 0.5714285714285714 mL/s, with the stated ID lists. The same unchanged deterministic script and inputs should repeat those values in the checked environment. Learner evidence must include two actual invocations, their outputs and version/command information. The package's author log does not establish that the learner ran anything. Correctly labelled paper traces support the conceptual prediction but leave the execution outcome open.
Independent practice
I1
The observed volume is 12 mL over 40 seconds, so pooled rate is 3/10 = 0.3 mL/s. The individual rates are 9/10 and 3/30 = 1/10; their equal-interval mean is 1/2 = 0.5 mL/s. The pooled question weights the 30-second low-rate window three times as much as the 10-second high-rate window. The second question treats both windows equally. Merely calling either number “the average rate” hides this choice.
I2
For an ID X: (a) observed [X], missing [], volume 0, observed time 12, scheduled time 12, rate 0.0 mL/s; (b) observed [], missing [X], volume total 0, observed time 0, scheduled time 12, rate None; (c) both lists empty, all totals 0, rate None. In (a), zero is a valid numerical rate. In (b)/(c), zero volume is an empty observed sum, not sufficient evidence for a numerical rate.
I3
Use A: 10 seconds, 10 mL and B: 10 seconds, missing. Correct observed rate is 10/10 = 1 mL/s. The wrong calculation yields 10/20 = 0.5 mL/s, treating B's missing volume as if it were zero when presented as a full-time rate. Two rows are the minimum under the requirement that both kinds are present. A good test asserts observed time 10 as well as rate 1, which localizes the defect better than checking a single decimal.
I4
A single row A: 10 seconds, zero mL suffices. if volume: evaluates zero as false, so the wrong branch labels A missing, omits its 10 seconds from observed time and returns no observed rate. Repair the branch to test if volume is None: for missing, with the observed calculation in else, preserving the validation guards. Testing volume == 0 to identify missing simply replaces one misclassification with another.
I5
Reverse order: volume 80, observed time 140, scheduled time 200, pooled 4/7. Observed IDs become [W4,W2,W1]; missing stays [W3]. Added missing W5 of 50 seconds: 80, 140, 250, pooled 4/7; observed IDs unchanged and missing [W3,W5]. Tripled observed volumes: W1 54, W2 162, W4 24, total 240, observed time 140, scheduled time 200, rate 12/7; lists unchanged. Each transformation is a separate experiment on the original input. Changes to ID ordering are expected and must not be confused with changes to totals.
I6
Negative values might indicate a signed quantity, instrument offset, unit mistake or invalid data, rather than a true measured zero. Silent clipping changes the estimand and can bias the result. Text-to-number conversion may be legitimate in a documented parser, but silently doing it changes this narrow contract and obscures what was actually supplied. Without originals, an investigator cannot distinguish raw input from corrections or reproduce the earlier result.
Preserve the original; report each failing record; obtain a justified correction or explicitly revise the contract; make a separately named corrected input; record the reason and affected rows; rerun the complete tests and report; compare old and new conclusions. Do not edit a record solely to get a desired answer. No external upload or new data collection is necessary for this fictional exercise.
Shortcut audits
H1
The tests establish only the cases and properties actually checked. They do not prove all inputs correct, establish sensor calibration/nonoverlap, remove missingness, or validate a general statement about a real collector. “Exactly” also confuses an exact ratio of supplied integer numbers with physical precision. Finally the packet is fictional, so no real-device empirical claim follows. Credit at least three distinct gaps with clear explanation, not three phrasings of “more testing.”
H2
Reruns reuse the same missing input and exclusion rule, so their agreement cannot reveal W3's volume. Under the additional bound, all-window rate can range from 0.4 to 0.7 mL/s. Both endpoints are compatible with identical observed data and identical computed observed rate 4/7. The range is conditional on the bound, not a probability interval or confidence interval.
H3
The ordered ID lists are intentionally input-order dependent. Numeric totals and pooled rate should be invariant to reordering this packet. Compare those specified fields, and compare ID lists against their expected new order. Running the same ordered input twice should reproduce the entire dictionary. A different ordered input is not the same input; expected differences do not establish nondeterminism.
Quiz: 30 points
Each question has 6 points. Record conceptual and executed evidence separately. A wrong calculation carried forward transparently may receive reasoning credit; do not award the numerical point for the wrong value.
Q1
Observed [A,B,D], missing [C]. Volume 76 mL; observed time 120 seconds; scheduled time 160 seconds; pooled rate 76/120 = 19/30 mL/s. Rubric: IDs 1; volume 1; observed time 1; scheduled time 1; correct quotient/fraction 1; units and observed-only interpretation 1.
Q2
Individual observed rates: 3/5, 4/5 and 0. Equal-interval mean = (3/5 + 4/5 + 0)/3 = 7/15 mL/s. The pooled rate 19/30 is larger because the long 80-second window has the largest rate and receives more duration weight. Equal-window averaging weights each of three windows 1/3; pooling weights them 1/6, 2/3 and 1/6. Rubric: individual rates 1; mean 1; weights 2; correct questions/interpretation 2.
Q3
Example valid-zero input is [{'id':'Z','elapsed_s':10,'volume_ml':0}]. Expect observed [Z], missing [], total 0, observed and scheduled time 10, rate 0.0. Example invalid input is [{'id':'E','elapsed_s':0,'volume_ml':1}]. Expect ValueError, no returned report. The first catches truthiness-based loss of zero; the second catches missing duration validation/division by zero or silent row omission. Rubric: valid input/expectation 2; invalid input/expectation 2; distinguish what each detects 2. Other positive durations and nonnegative volumes are acceptable when they discriminate the same faults.
Q4
160 seconds is scheduled time; the observed denominator is 120. Coverage = 120/160 = 3/4 = 75%. Missing C contributes between 0 and 20 mL under the added bound. Full-packet rate lies from 76/160 = 19/40 = 0.475 to 96/160 = 3/5 = 0.6 mL/s. These bounds do not change the observed-only rate. Rubric: denominator diagnosis 2; coverage 1; bound on missing volume 1; full interval and conditional interpretation 2.
Q5
One model audit note, adapted only when the learner actually has the stated evidence:
“I asked for volume per second across the windows with recorded volumes. My input retains all four IDs, including missing C and the observed zero in D. I used the unchanged summary function, with the integer-volume and positive-duration contract, in a fresh local Python process. I recorded the interpreter version, command, source copy and actual output beside my prediction. Hand addition gives 76 mL over 120 observed seconds, or 19/30 mL/s, matching my run. A zero-volume test checked that D was not discarded. Scheduled time is 160 seconds, so observed-duration coverage is 75%. This result does not determine the full-packet rate or the rate of a future collector. I would preserve any corrected C record separately and rerun the checks before revising that conclusion.”
Rubric: question/units 1; recoverable procedure 1; independent numerical expectation 1; discriminating check 1; limitation and truthful status 1; actual completed execution evidence 1. A trace-only learner can earn at most 5/6 here and should be told precisely which evidence remains absent. Do not invent a command/version/output to obtain the final point.
Project: 40 points
P1 — 8 points
Observed S1,S2,S4,S5; missing S3. Volume 95 mL; observed time 200 seconds; scheduled time 250 seconds; coverage 4/5 = 80%. Pooled rate = 95/200 = 19/40 = 0.475 mL/s. Observed interval rates are 2/5, 3/5, 0 and 4/5. Equal-interval mean = (2/5+3/5+0+4/5)/4 = 9/20 = 0.45 mL/s. The 75-second interval receives more weight in pooling; the 25-second interval less. These questions differ even though both values are below the fictional target.
Rubric: correct contract/representation 2; correct volume and time totals 2; pooled result/units 1; coverage 1; mean and weighting explanation 2.
P2 — 8 points
Run the supplied function on the five stated rows. Preserve actual output, exact input/source and command/environment. A measured-zero row must remain observed; a row with an extra or missing key must raise ValueError; a before/after comparison must show the original records unchanged. State expectations before execution. A single run producing 0.475 without these records is insufficient evidence.
Rubric: correct predicted result 1; actual correct run and recoverable output 2; source/data/command/environment record 1; three discriminating test designs and expected outcomes 3; actual executed test evidence 1. Trace-only work can earn at most 5/8, with the two run points and one executed-test point outstanding. Do not deduct for honestly reporting a failed execution if diagnosis and correction subsequently supply the required verified result; retain the failure evidence.
P3 — 8 points
S3 volume lies between 0 and 40 mL. Full-packet rate lies between 95/250 = 19/50 = 0.38 and 135/250 = 27/50 = 0.54 mL/s. Observed-only 0.475 does not meet 0.5. The full-packet rate is not known to meet it because the interval includes values below and at/above it. Solve (95+x)/250 = 0.5: x=30 mL. Meeting or exceeding requires x at least 30, which is possible but not established by the 0–40 bound. Do not assign a probability from interval width.
Rubric: missing-volume bound 1; full rate interval 2; observed/full target distinction 2; threshold equation and 30 mL 2; assumption/uncertainty statement 1.
P4 — 8 points
Update A adds S6, leaving S3 missing: volume 120 mL, observed time 250 seconds, scheduled time 300 seconds; rate 120/250 = 12/25 = 0.48 mL/s; coverage 250/300 = 5/6. Observed IDs S1,S2,S4,S5,S6; missing S3.
Update B fills S3 only: volume 115 mL, observed and scheduled time both 250 seconds; rate 115/250 = 23/50 = 0.46 mL/s; coverage 100%, no missing IDs. The rate falls despite added positive volume, because the newly observed window's rate 20/50 = 0.4 is below the previous pooled rate 0.475. More observed data need not increase an average. Label originals, A and B as separate inputs and retain the exact change record.
Rubric: A totals/rate/coverage 3; B totals/rate/coverage 3; alternatives kept separate 1; preservation and explanation of B's decrease 1.
P5 — 8 points
A model report below illustrates interpretation, not a substitute for the learner's evidence. Its execution statements describe the author's checked scenario run saved in this package; a learner must replace them with their own true status.
“The original synthetic packet contains 95 mL across 200 seconds with observed volumes. Its pooled observed rate is 0.475 mL/s, below the fictional comparison target of 0.5. Observed-duration coverage is 80% because S3's 50 seconds have no volume observation. The equal-interval mean is 0.45 mL/s and answers a different question: each window receives equal weight rather than weight proportional to its duration.
“I derived the totals by hand and checked the supplied function in a local Python run. The input and source copies, command, interpreter version and actual output are preserved with the run evidence. The zero-volume, malformed-record and unchanged-input checks are separate from the ordinary example. Passing them supports these computations, not the accuracy of a real instrument.
“The added constraint on S3 implies a full-packet rate between 0.38 and 0.54 mL/s. Therefore the full packet is not known to meet the target; S3 would need at least 30 mL. Treating missing volume as zero would turn an assumption into an observation.
“In separate revisions, adding S6 gives 0.48 mL/s with 5/6 coverage, while filling S3 with 20 mL gives 0.46 with complete coverage. I kept the original and both revised inputs. My next check would verify whether the stated missing-window bound is justified before using it to interpret the target. No real-device generalization follows.”
Change log example: original input unchanged; A adds S6 (50,25); B instead changes S3 volume from None to 20. A rejected draft claim “the full packet is below target” becomes “the observed-only rate is below target; the bounded full-packet rate can be below or above it.”
Rubric: original result/question 2; revised/uncertain conclusions 2; evidence and honest execution status 1; rejected shortcut/correction 1; specific change log 1; useful next check and clear communication 1. A coherent trace-only report can earn the communication points if it does not claim execution; P2 records the separate execution gap.
Delayed transfer
D1
The differences between consecutive cumulative readings are 4−0=4 counts over 10−0=10 seconds; 16−4=12 counts over 30−10=20 seconds; 34−16=18 counts over 60−30=30 seconds. These three records total 34 counts over 60 seconds, giving 17/30 counts/s. Interval rates are 2/5, 3/5 and 3/5; their equal-interval mean is 8/15 counts/s. Adding cumulative readings 4+16+34=54 double-counts earlier events and gives the wrong 54/60=0.9 counts/s if paired with interval durations.
Change volume_ml to an explicitly count-based interval field, output quantity labels to counts, and rate units to counts/s. Document the preprocessing from cumulative readings, starting baseline, increasing times and the assumption that the counter has no reset/rollover. Retain the original cumulative data, not only the differences. A falling cumulative value is a reason to investigate a reset or invalid data, not automatically evidence for negative event counts. Reusing arithmetic does not authorize misleading volume labels.
D2
A strong answer includes question/units; original data and contract; exact source/environment/command; independent expectations and boundary/error tests; actual outputs/correction records; and limits of interpretation. Five clear items suffice. Example gap: a duplicate-ID guard may work perfectly while windows overlap under different IDs. Or reruns may match perfectly while missingness distorts a desired full-period inference. The test answers a computational question, not every scientific one. The final comparison should name a concrete improvement, such as preserving a previously omitted missing-data rule, rather than merely saying “be more careful.”
Marking and review boundaries
Quiz and project marks are separate formative groups, not automatic semester grades. Conceptual accuracy, executed evidence and scientific interpretation should be reported separately. A high total without execution cannot establish computational performance. The author and independent internal reviewer can check this package; that is not human specialist moderation, calibrated marking reliability, learner timing or tested transfer. Those remain outstanding before stronger claims.