Checkpoint
One last thing before we move on. Same surface as a write step — but the lesson doesn't complete until this passes.
Measure the curse of dimensionality yourself. Write contrast(d, n=60): seed already set — drop n random d-dimensional points and one query (all coordinates random.random()), then return nearest distance / farthest distance from the query. Print the ratio for dims=2 and dims=500 (exact format: f"dims=2 nearest/farthest = {low:.2f}" / f"dims=500 nearest/farthest = {high:.2f}"), then print whether contrast shrank (high > low + 0.3).