\answer

Description

Specifies the answer to the current question, part (in Multipart questions), or response object (in Inline questions).

The \blank macro has three different definitions, depending on the question type in which it is used.

The basic form of \answer

For most question types, \answer takes one argument: the answer to the question, in whatever form that question type expects.

Syntax

\answer{correct-answer}
correct-answer
The correct answer to the current question.

However, the syntax is different for Numeric and List questions; see below.

\answer in Numeric questions

Numeric questions have the capability to present the student with separate entry cells for the numeric and units parts of their response. For these questions, the \answer macro accepts an optional argument, which is taken to be the units in which the correct answer is given.

If the optional argument is omitted, only one entry cell will appear in the question.

Syntax

\answer[units]{numeric-part}
units option
The units in which the answer is given. The student is not required to answer in these units, but their answer must be equivalent to the specified answer.
numeric-part
The numeric part of the answer.

\answer in List questions

Please refer the entry for List questions for a description of the grading capabilities of this question type.

Syntax

\answer{credit}{answer}
credit
The amount of credit that a response matching this answer will receive. Must be a decimal value between 0 and 1, inclusive.
answer
The answer against which the student's response is to be compared.