Code Room
Vibe codingEasy
Question
An AI assistant generated a Python function `clamp(value, low, high)` that returns `value` constrained to the `[low, high]` range. You can't easily prove it's correct by reading, so you decide to pick exactly 2-3 inputs that would expose a bug if one exists. Which inputs do you choose, and why those?
What a strong answer looks like
Treat the AI’s output as a draft to verify, not an answer to trust. Name the specific flaw and the input that triggers it, say how you’d catch it — tests, edge cases, reading critically — and how you’d re-prompt or decompose to get it right.
Learn the concepts
Vibe coding: describe the solution in plain language (or narrate it) and the coach grades your approach. Generating runnable code from your description is coming next.
Run or narrate your approach, then ask the coach.