Question
You're a junior on a Python team and need a small utility: a function that takes a list of order dictionaries and returns the total revenue, skipping any order whose status is "refunded". You're about to ask an AI assistant to write it. Write the prompt you'd give. Then explain: what would a vague prompt like "write a function to total orders" likely get wrong here, and how does your prompt prevent that?
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.
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.