# 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.

Let us create a basic question asking to sort a set of integers:

By default,

• Lists are allowed but elements need to be enclosed within curly brackets.
• 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 we specify in the table below.

-7,-4,1,5

LIVE DEMO

By default, to be accepted, lists in student and correct answers must have equivalent items and 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.

The grading will behave as you can see below.