## Define questions and answers

Enter your question in the input field. The gaps for the solution input can be defined within the text. Any number of gaps can be created. A more detailed description of how to create a gap can be found in the help section Text entry interaction.

## Step by step

In the following, the creation of a calculation interaction is explained by means of an example.

### Step 1: Design the task

The properties of a circle are to be calculated. The learner is expected to specify the formulas for the calculation of the circumference, the surface area, and the diameter.

### Step 2: Create the question

In the **tab "Question & Answer"**, enter the question in the text field. Click on the gap symbol or create a new gap via the button *Add gap*.

### Step 3: Specify the correct solution

Enter your formula in MAXIMA notation in the field *Solution* under *Edit gap*. In the example, the solution is the formula for the calculation of the circumference of a circle: u=2*%pi*r.

Further examples of the MAXIMA notation:

**E=m*c^2**: Insert operators between any two variables (e.g. "m*c" instead of "mc").**%e^%i*%pi=cos(alpha)+%i*sin(alpha)**: Mathematical constants are entered with a preceding % (e.g. %e, %pi). Logarithmic functions can be written as usual (e.g. sin(1), cos(1)).

### Step 4: Enable formula check (optional)

With the function **Check formula**, the participant can check the validity of their input. The entered formula is validated with MAXIMA. Select *Show syntax errors *to allow the participant to verify whether their entered formula is syntactically correct.

You can also allow the participant to preview the formula. The formula is presented via MathJax (LaTeX).

## Task assessment in the expert mode

For the assessment of a task of the type formula comparison, extended options are available in the expert mode.

The **Expert mode **allows for the manipulation of the MAXIMA comparison operators:

ONYX offers two different comparison options:

**True/false**comparison with the standard expression*is(equal(ev(LEARNERRESPONSE),ev(CORRECTRESPONSE)));***Points**-based comparison with the standard expression*if is(equal(ev(LEARNERRESPONSE),ev(CORRECTRESPONSE))) then MAXSCORE else MINSCORE;*

In the text field **assessment (MAXIMA)**, you can adjust the MAXIMA command. To do so, you can use the following variables:

**LEARNERRESPONSE**(the participant's answer for this gap)**CORRECTRESPONSE**(solution for this gap)**MAXSCORE**(maximum points for this gap)**MINSCORE**(minimum points for this gap, usually 0)- Access to other gaps is possible via the attachment of their
**ID**, e.g. LEARNERRESPONSE_GAP_1. The gap's ID can be found in the edit window of the gap, in the lower right corner.

Important

The **true/false** comparison only works when MAXIMA returns a Boolean value.

A numerical value can be returned if the option **Points **is used. The numerical value is the score that is bounded by the given minimum and maximum points.