Practice · Control Flow Lab
Ledger Sweep
Why this is here
A bounded for loop over a fixed 25-row table: iterate every row, sum the amount wherever the status is POSTED, and submit the total. Three rows are negative, two are $0.00 — both are legitimate rows your loop shouldn't special-case or skip. One row's status is "POSTED " with a trailing space; a loop that compares status with a strict === against the literal string will silently drop that row and land on the wrong total. Trim before you compare.
| # | Amount | Status |
|---|
Telemetry
Iterations: 0
Elapsed (s): 0
Verdict: PENDING