You add an algorithm to a question of a quiz, so that the question uses variables that get new values.
Before you start
The quiz is open in the Quiz Designer.
Steps
On the page, in the Add: list, click Numeric. The Numeric question dialog opens.
In Question text, enter a question that uses a variable. For example: What is $a + 1?
In Number (required), enter the answer, with the variable. For example: $a+1
In the Add: list of the dialog, click Algorithm. The Algorithm section opens.
In the algorithm editor, define the variable. For example: $a=range(2,9);
Click Insert.
The question appears on the page. The Quiz Designer shows the variable name as typed.
Check out Algorithms in the Question Designer for the syntax.
