# Quickstart: a verified calculation ```bash pip install noodlelab # or: uv add noodlelab ``` ```python # drop.py import noodlelab.verify as nv with nv.record("drop test") as rec: h = rec.input("h", "2.00 ± 0.01 m", source="tape measure, lab book p. 4") g = rec.input("g", "9.81 ± 0.02 m/s^2", source="local gravity survey") t = rec.result("fall time", (2 * h / g) ** 0.5) # (0.6386 ± 0.0017) s v = rec.result("impact speed", (2 * g * h) ** 0.5) # (6.264 ± 0.017) m/s rec.require(""" DRP-001 fall_time <= 1 s [Analysis] # The drop shall take at most 1 s DRP-002 impact_speed <= 7 m/s [Analysis] # The part shall land below 7 m/s """) rec.verify("DRP-001", t) rec.verify("DRP-002", v) rec.close_to("v = g·t", v, g * t, rtol=1e-9) # two routes to the same answer print(rec.summary()) ``` ```console $ noodlelab verify drop.py ✓ drop.py ✓ drop test: passed ✓ DRP-001: 0.6386 s meets ≤ 1 s (margin +0.3614 s, +36.1 %) ✓ DRP-002: 6.264 m/s meets ≤ 7 m/s (margin +0.7358 m/s, +10.5 %) ✓ v = g·t: (6.264 ± 0.017) m/s agrees with (6.264 ± 0.017) m/s (|Δ| = 0 m/s, ...) record: runs/20260926-101500-drop-test-1a2b3c4d/provenance.json 1 of 1 passed ``` ## What you get - **Units**: `h / g` is in s², and `(2 * h / g) ** 0.5` is in seconds. Adding metres to seconds raises an error. Convert with `.to("ms")`. - **Uncertainty**: GUM propagation, with correlations kept (`t` and `v` both depend on `g` and `h`). `nv.budget(t)` shows each input's share, and `nv.fmt(t)` rounds as GUM 7.2.6 says. - **Requirements with margins**: each check says how far inside or outside the limit the result is, in the requirement's unit and as a percentage. - **A record**: `runs/