Code RoomCurrency formatting for global users
MediumPrep Room Coding #4448

Currency formatting for global users

Vibe & agenticAlgorithms & data structuresMid–Senior~15 min

You asked an AI agent to format an order total for display. It produced this TypeScript helper and the demo (a US test account) looks perfect. What breaks once this reaches real users, and what's the fix?

Implement
format_money(amount_minor: int, currency: str, locale: str) → str
Examples
in[129900,"USD","en-US"]out"USD 1,299.00"
in[129900,"EUR","de-DE"]out"1.299,00 EUR"
in[129900,"JPY","ja-JP"]out"JPY 129,900"
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.

0:00 of about 15 min

Vibe & agentic: describe the solution in plain language (or narrate it) and the coach grades your approach.

Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.