Skip to content

Fill in the Blank

The user fills in a blank with a word or phrase.

Evaluation

  • Case-insensitive comparison with trim.
  • correctAnswer accepts a string or an array of alternatives.
  • Score: 0 or 10 (binary).

Single alternative

{
"exerciseId": "ex_002",
"area": "grammar",
"type": "fill_blank",
"answer": "WENT",
"correctAnswer": "went"
}

Multiple alternatives

Useful for synonyms or accepted verb forms:

{
"exerciseId": "ex_002b",
"area": "grammar",
"type": "fill_blank",
"answer": "goes",
"correctAnswer": ["went", "go", "goes"]
}

Correct if the answer matches any alternative.

Responses

// Correct
{ "correct": true, "score": 10, "feedback": "Correct!", "metadata": { "area": "grammar", "type": "fill_blank" } }
// Incorrect
{ "correct": false, "score": 0, "feedback": "Incorrect. Try again.", "metadata": { "area": "grammar", "type": "fill_blank" } }