Quick Practice
{score.correct}/{score.total}
What are the coordinates of this point?
(
{
setXVal(e.target.value);
setFeedback(null);
}}
disabled={feedback === "correct"}
className="w-20 rounded-lg border-2 border-border bg-surface px-3 py-2 text-center text-lg font-bold outline-none focus:border-unit-7"
placeholder="x"
aria-label="x coordinate"
/>
,
{
setYVal(e.target.value);
setFeedback(null);
}}
disabled={feedback === "correct"}
onKeyDown={(e) => {
if (e.key === "Enter") {
if (feedback === "correct") next();
else check();
}
}}
className="w-20 rounded-lg border-2 border-border bg-surface px-3 py-2 text-center text-lg font-bold outline-none focus:border-unit-7"
placeholder="y"
aria-label="y coordinate"
/>
)
{feedback === "correct" ? (
) : (
)}
{feedback === "correct" && Correct! ({target.x}, {target.y})
}
{feedback === "swapped" && (
You swapped them — the x-coordinate comes first! Try again.
)}
{feedback === "incorrect" && (
Not quite. Trace down to the x-axis, then across to the y-axis.
)}
);
}
// ── Main explorer ────────────────────────────────────────────────────────────
export function ReadCoordinatesExplorer() {
const [point, setPoint] = useState(() => ({ x: 3, y: 2 }));
const [steps, setSteps] = useState