<< Part 5 - Part 7 >>

Part 6: FiniteNumberSets

It's possible to have finite number sets as solutions for certain questions of generic tex problems. The corresponding question type is "input.finite-number-set". Each answer of a question of that type has a finite number set as solution. The solution is specified by means of the \solution command, as usual. The argument of the command must be a comma-separated list of variable names. Each variable denotes an element of the set. Of course, the variables must be defined somewhere in the problem. Please note: it is not possible to use literal numbers in the solution. You have to use variables.

Here is an example:



Test Test Test




                \text{\textit{Write down the set A of numbers $\var{a}$, $\var{b}$, and $\var{c}$}:}
                \explanation{Test test Test}

                        \text{ A = }
                        \solution{a, b, c}



If the user has not edited the problem before, the problem applet of this example looks like the following:

The user has to click the button "Define set" to edit the set. Immediately after clicking the button an empty set shows up:

Elements can be added by means of the "+" button. The "-" button removes the last element:

Please note: The technique with the initial "Define set" button is needed to distinguish a not-edited set from an empty set. Initially, the set is not edited. Immediately after clicking the "Define set" buttun the set is considered edited, but empty.

finite_set_input.png (20.4 KB) Anonymous, 05/29/2013 01:44 PM

finite_set_input_initial.png (19.6 KB) Anonymous, 06/21/2013 09:59 AM

finite_set_input_empty.png (19.5 KB) Anonymous, 06/21/2013 09:59 AM

Finite_set_input Finite_set_input_initial Finite_set_input_empty
Add picture from clipboard (Maximum size: 500 MB)