Lists and sets
You can have answers with lists and sets. There are multiple forms understood as lists; you can configure it in the Input options and Validation options sections.
Example 1: Compare as lists
Let us create an essential question asking to sort a set of integers:
By default,
Lists are allowed, but elements need to be enclosed within curly brackets.
The comma is used as a separator.
The student's answer is compared as a list (taking into account order and repetition).
In this example, we check the option Lists without enclosers.
Thus, the following answers will be validated as specified in the table below.
Student answer | Validation |
---|---|
-7,-4,1,5 | |
Example 2: Compare as sets
By default, to be accepted, lists in student and correct answers must have equivalent items and be in the same order. That is, the order is important, and repetition has sense. In contrast, sets are lists without order nor duplicated items.
As an example, we can ask for the roots of a given polynomial, and we might be interested in accepting any answer with the correct values.
Thus, we can set the lists to be understood as sets in Validation options > Comparison with student answer. That is, ignore repetition and order in the comparison.
Besides, we can also define these lists to be understood as sets where repetition matters, but order does not. The grading will behave as you can see below.
Student answer | Validation |
---|---|