Skills101
← All practice quizzes

Quiz: Prompting for Code

5 questionsNo time limitPass: 60%+10 XP on first pass

Turn vague one-line prompts into clear specs that produce correct code the first time — with a reusable template, a worked example comparing a weak and a strong prompt, and techniques like asking for a plan first, giving examples and splitting big tasks.

Log in to take the quiz

Free account · see your score, answers and explanations, earn XP

  1. Question 1

    Which prompt is most likely to produce the code you actually need?

  2. Question 2

    What is the benefit of asking the AI for a plan before code?

  3. Question 3

    In the demo, what did normalise_indian_mobile return for "5876543210"?

  4. Question 4

    The AI's function returns None for an empty list but you need 0.0. What is the best follow-up?

  5. Question 5

    Which is a good prompt for LEARNING a DSA problem?