## Example "Digging a hole"

Create a - The text variable {PEOPLE} should be randomly assigned the value "men", "woman" or "children".
- The numerical variables {A}/{B} indicate the number of people.
- The numerical variable {MIN} stands for the given time.
The answer is to be calculated from the given values and will also be represented as a variable later: - The numerical variable {ANSWER} refers to the time to be calculated.
| |

All required variables can be managed in the tab - In the section
, create a new variable via the button*Pre-processed variables**Add new variable* - Enter the variable name
**PEOPLE**. Please pay attention to the correct spelling of the variable name. Upper- and lower-case letters must be the same as for the placeholder. - Since this is a text variable, select the entry
as variable type.*Text* - The value is set from a
**random selection**of given terms. - Enter the terms "
**men**", "**woman**" and "**children**". Separate multiple values by a line break or semicolon.
| |

All other variables will also be created: - Variable: {PEOPLE}, type: text, random selection: men; woman; children
- Variable: {A}, type: integer, value range: min=2, max=4, step=1
- Variable: {MIN}, type: floating-point, calculation (MAXIMA): 120/{A}
The variable {B} should be set depending on the variable {A} to simplify the calculation. Therefore, the variable {B} is initially empty and then set to the appropriate value using a condition. - Variable: {B}, type: integer, condition: IF A = 2 THEN B = value range: min=4, max=12, step=2 ELSE IF A = 3 THEN B = random selection: 6; 12 ELSE IF A = 4 THEN B = random selection: 8; 12
- Variable: {ANSWER}, type: integer, calculation (MAXIMA): 120/{B}
| |

To insert the variable into the task text, you need to type the variable name {PEOPLE}. In the example, the variable is included in a task of the type calculation interaction. | |

One of the defined values will be randomly chosen for each participant and each test attempt. In the example, the value " |