-
MathType
-
Wiris Quizzes
-
Learning Lemur
-
CalcMe
-
MathPlayer
-
Store FAQ
-
VPAT for the electronic documentation
-
MathFlow
-
BF FAQ
-
Miscellaneous
-
Wiris Integrations
Basic grading function
Reading time: 1minLet’s suppose we want to ask the question: “Give a prime number.” For this, we need to use a grading function.
First, create the grading function in the Define random variables and functions section. In this example, the grading function will be called gf
.
The function gf(x)
returns true
if x
is prime and false
otherwise. To use this function as the validation method, select Custom grading function in the Validation options section and enter the name of the grading function in the input field—gf
, in this case.
Caution
You can also define how the student’s answer is passed to the grading function. This is an advanced feature, described in the final sections of this documentation. In most cases, the default value, Evaluated, should be used.
As for the Correct answer field, any value will work. Since the Custom grading function is used, it is the function’s output that determines whether the answer is correct. In this case, you can simply input any prime number.