Code review test
Find the Bug
AI writes more of the code now. Someone still has to read it. Each question is code that runs, looks clean and gives a plausible answer. One line is wrong. Read it, then pick the line and the reason.
Settings
Language
Level
Python, Easy: 8 bugs in 12 minutes. Plain logic: off-by-one, a wrong comparison, the wrong variable.
Sign in to play, so the server can mark your run.
Your results
Warm up
def average_fill(fills): """Volume-weighted average price of a list of (price, qty) fills.""" notional = sum(px * qty for px, qty in fills) total_qty = sum(qty for _, qty in fills) return notional / len(fills)Warm up: which line is wrong?
Line 5. It divides by the number of fills, not the total quantity, so a small fill counts as much as a big one.
How it works
Each question is a short program in Python or C++ that runs and gives a believable answer, with exactly one wrong line. The slip is in the logic, never a typo or a style point. Four options each name a line and say what is wrong there. Pick one by clicking the option or the line. You get 8 bugs in 12 minutes, and the run is sent when the clock reaches zero. You score 1 for each bug you find, and the review shows every bug, why it matters and the fix.
Read the brief first
The brief says what the code should do. Check each line against that, not against whether it looks tidy.
Run a tiny case
Push a small input, such as two fills or three prices, through the code in your head. A wrong total usually points at the line.
Check the edges
Loop bounds, the first and last element, division by a count and units are where most bugs sit.