## Validation

Here you select what kind of input is expected from the student. For example, choose between general mathematical expressions or quantities that involve units. Along with this, you can decide how the correct answer is validated against the student answer. The main function of many of the options is to decide how syntax checking works on the student side. For example [0,1) is normally highlighted as incorrect syntax, unless we choose the *Intervals* option. The tab is divided into three sections, explained below.

### Allowed input

Choose the desired answer type. These can be:

**General**: Any mathematical expression. This is the default option, and it is probably the type you need in the majority of cases.**Quantity**: The most important use of this is for answers with*units*or*currencies*. This option would also be appropriate for numerical answers, fractions, ratios, etc. The*General*option will work for these cases, but you have a few more options with*Quantity*.**Text**: For pure text answers with no mathematical content. This option is rarely used. More details here.

The first two also have a series of options.

#### Options for General

Option | Description | Default |
---|---|---|

Constants | Which symbols are recognized as mathematical constants (e.g. if i is enabled then i² will be understood as –1). | All selected |

Functions | Which function names are recognized by their usual meaning. (e.g. if exp/log is enabled then "ln(2)" will be understood and calculated as 0.6931... | All selected |

User Functions | Define your own function names to add to the above list. They won't be calculated as anything, but sometimes this option is useful. See this page for an example: user functions | Empty |

List | Allow lists as answers. Options for list separators are shown below. | Selected |

Lists always need curly brackets "{}" | Require that lists be enclosed in curly brackets to be recognized as a list (e.g. if selected "4,7,88,9" would not be understood as a list - in fact it would be highlighted as syntactically incorrect). | Selected |

Intervals | Recognizes interval notation as valid syntax. Expressions like [0,1] are already valid without this, but now we may have for instance ]0,1] or (0,1]. More details here. | Unselected |

Separators | Decide which symbols act as decimal, digit, and list separators. | Point "." : decimal digits |

Comma "," : list items | ||

Space " " : Nothing |

#### Options for Quantity

Option | Description | Default |
---|---|---|

Constants | Which symbols are recognized as mathematical constants (e.g. if i is enabled then i² will be understood as –1). | π, i, j |

Units | Which units are recognized. It's important to note that "all" includes more units than the other 6 shown - it includes all S.I. basic and derived units. | all |

Unit prefixes | Which unit prefixes are recognized. Again, "all" includes more prefixes than the ones shown. | M,k,c,m |

Mixed fractions | Allow mixed fractions to be recognized. Without this option, a number next to a fraction is understood to be multiplying it. | Unselected |

List | Allow lists as answers. | Selected |

Separators | Decide which symbols act as a decimal, digit, and list separators. Additionally, you can use apostrophe `'` for decimal mark. You must choose Quantity, and in Options > Units uncheck all, and then uncheck `º'"` . | Point "." : decimal digits |

Comma "," : list items | ||

Space " " : Nothing |

### Comparison with student answer

Once we've decided what format we expect the student answer to be in, we have a few options for how their answer should be compared to the correct answer.

Comparison with student answer criteria | ||
---|---|---|

Tolerance | This specifies the tolerance criteria used for the comparison between the student's answer and the correct answer. This setting applies globally (to the entire question). The default value is 0.1% percent error. | More details |

Literally equal | This removes all mathematical interpretation from the comparison. The student's answer is only correct if it matches the correct answer exactly. For example, if the correct answer is 4 but the student writes 4.0, it will not be counted. This criterion is rarely recommended. | |

Mathematically equal | This is the default comparison. It will detect if what the student has written is mathematically equal to the correct answer. For example, we don't need to worry if the student writes a + b or b + a. | More details |

Equivalent equations | This comparison is very similar to the above, but it is for the special case where the answer is an equation (e.g. the student could write y = 2x – 5, or , or any equivalent form). | More details |

Any answer | Anything that the student answers will be counted as correct. This is useful in some cases. | More details |

Grading function | Define your own function to decide which answers are accepted, and how to grade them. This is an advanced feature. | More details |

Compare as sets | This is a checkbox that is independent of the above options. When checked, order and repetition are ignored from lists. So, if the correct answer is the set {1,5,2}, then {5,5,5,2,1} (for example) would be accepted. | More details |

### Additional properties

Sometimes it's not just the *value* of the answer that's important, but also its *form*. This usually happens when you are teaching basic algebraic manipulation, and you want the answer in a very specific form. For example, if you’re teaching how to reduce a fraction, you probably want to accept only the reduced fraction as the correct answer. If so, all other equivalent fractions are wrong, despite having the same value. In this case, we need to select *is simplified* from the list of **Additional properties**.

Structure | Examples | ||
---|---|---|---|

Correct | Wrong | ||

has integer form | It checks whether the answer is a single integer | ||

has fraction form | It checks whether the answer is a single fraction or integer | ||

has polynomial form | It checks whether the answer is syntactically a polynomial with real or complex coefficients | ||

has rational function form | It checks whether the answer has the form of a rational function | ||

is a combination of elementary functions | It checks whether the answer is a combination of elemental functions | ||

is expressed in scientific notation | It checks whether the answer is in scientific notation |

Specific property | Examples | ||
---|---|---|---|

Correct | Wrong | ||

is simplified | It checks whether the expression cannot be simplified | ||

is expanded | It checks whether the expression is in its fully expanded form | ||

is factorized | It checks whether an integer or a polynomial is factorized | ||

is rationalized | It checks whether the expression does not have square (or higher) roots in the denominator. It also checks whether the expression has a pure real denominator (in the case of complex numbers) | ||

doesn't have common factors | It checks whether the summands of the answer have no common factors | ||

has minimal radicands | It checks whether any present radicands are minimal | ||

is divisible by | It checks whether the answer is divisible by the given value | , given | , given |

has a single common denominator | It checks whether the answer has a single common denominator | ||

has unit equivalent to | It checks whether the unit of measurement in the student's answer is equivalent to the given one. Multiples are not equivalent | , given | , given |

has unit literally equal to | It checks whether the unit of the answer is literally equal to the given one | , given | , given |

has precision | It check that the response is expressed within a given precision range | , between 3 and 4 significant figures | , between 3 and 4 decimal places |

For a complete and advanced description of all the properties, see assertions.