# Code a Question in Points Mode

In points mode, the following syntax is used to code a question:

flag#:[position,label]

where # is a number, position specifies the location on the number line graph to which the point must be dragged, and label specifies the label for the point.

Note A semicolon is necessary to delimit multiple elements.

For the label variable, use the syntax for the <symimage> tag; for details see Creating Math Questions. The following table shows examples for coding the label variable.

To Show:

Code This:

Example Code Block

Displayed to Students

pi symbol

pi
flag1:[3.14,pi]

stacked fraction

x/y
flag1:[0.5,1/2]

square root

sqrt(x)
flag1:[3,sqrt(9)]

nth root

rootn(x)
flag1:[<EQN
2**(1/3)>,root3(2)]

For points that cannot be located within the range of the number line graph, the position value is distractor. If all point values are set to distractor, the answer key must be specified as no solution.

## Examples

The following table shows example code using points mode and its explanation.

Example

Description

flag1:[0.5,1/2]

Indicates that flag1 has a correct position value of 0.5 on the number line graph and the stacked fraction 1/2 is displayed as its label.

flag1:[3.14,pi]

Indicates that flag1 has a correct position value of 3.14 on the number line graph and an image of pi is displayed as its label.

flag1:[1,1];
flag2:[distractor,1
5]

Indicates that flag1 has a correct position value of 1 on the number line graph and an image of 1 is displayed as its flag. Flag2 is a distractor and the image of 15 is displayed as its label.

Note The upper_bound of the range must be set to less than 15.
flag1:[distractor,1];
flag2:[distractor,2
];
no solution

Since all two points are distractors, the answer key must be set to no solution.