Random Swap

Quite often when writing a question it is useful to be able to randomly choose between wordings. This increases the level of randomization, and OTTER includes an easy way to do this. If you create a chain of

{{{ some text }}}-{{{some other text}}}-{{{more text}}}

OTTER will randomly display only one block from the chain. Please note, the chain is linked by hyphens.

Example:

{{{Find}}}-{{{Choose}}}-{{{Select}}} the mode of the following {{{set}}}-{{{list}}} of numbers.

One possible output would be:

Find the mode of the following list of numbers.

More complex randomization of sentences

Sometimes depending on an earlier choice, you would like to limit the set of future choices. This is easy to see with an example:

{n{Find}}}-{n{Choose}}}-{n{Select}}}-{q{What is}}} the mode of the following {{{set}}}-{{{list}}} of numbers{n{.}}}-{q{?}}}

In this case, the option "What is" required a question mark at the end of the sentence, while the others do not. We thus split the choices into groups - if a choice is made from the "n" group, this n is saved, and later choices will always be an "n" if there is one available. In this case it means a question starting "Find" will always end in "." while a question starting "What is" will always end in "?"

The syntax for the group marker is to remove the middle bracket and replace it with any collection of lowercase letters and numbers. So

{a{something}}} {1{something}}} {a123{{something}}}

Are all valid.

If you use {{{, then any option can be chosen, including those with group markers.