Skip to main content

Guess the Output · #69 · 2026-06-12

What does this print?

Python ·Difficulty 2/3

How to play

Read the code snippet and pick the correct output from four choices. One shot — no take-backs. Press 1–4 or click to answer.

type Shape = "circle" | "square";
function area(s: Shape): number {
  switch (s) {
    case "circle": return 1;
    case "square": return 2;
  }
}
console.log(area("circle"));

Loading your progress...

Press 1 through 4, or tap a numbered choice, to answer. Back to hub