Text
Students can answer with plain text, removing any mathematical comparison. You need to select the Text answer type for pure text answers with no mathematical content.
![WirisQuizzes Studio interface when Text answer type is selected](../../image/uuid-4b387930-d2a0-0271-545b-a1a4d675b6e1.png)
Validation options
There are several particular validation options when we create a Text question.
![Text specific validation options](../../image/uuid-843ebd78-f415-6ed1-8bdd-f247c21fd16f.png)
Note you can set:
Match case: if disabled, lowercase and uppercase letters are equivalent.
Match spaces: if disabled, leading and trailing spaces will be removed, and internal groups of spaces will be collapsed to one.
Random variables
If the correct answer is generated using CalcMe, it must be a string. To convert an expression to a string you can use:
Make a constant string:
a="123"
Concatenate with a string, even the empty one:
b=123|""
string(123)
string_substitution("#1",123)
If you are using the string_substitution()
command, it's essential to consider that mathematical expressions can't be introduced through the code editor. You can find an example below:
![calc.strings.calc.png](../../image/uuid-9157cba9-66bc-f497-3c21-3df87a4913cc.png)
Tip
You can see more details regarding the code editor and what this new feature has to offer here.
Example: Converting a number to hexadecimal
Imagine creating a question asking to convert a given random number to hexadecimal. To do so, we need to start creating the CalcMe algorithm where we're going to define than random decimal value and the corresponding hexadecimal representation.
![hexadecimal_algorithm.png](../../image/uuid-de191bfa-380d-cd10-6e75-491cc46109f0.png)
Thus, the variable will correspond to the correct answer to the question. We need to define it in WirisQuizzes Studio accordingly.
![hexadecimal_correct_answer.png](../../image/uuid-1e031f7a-cea8-a3fe-05a9-094bd2aca27e.png)
As we want to accept both answers in capital or lowercase letters, but we want the answer to have exactly 8 digits, we will select the following validation options:
![hexadecimal_validation_options.png](../../image/uuid-e796a44f-ed2e-0a22-4ad1-7e5ec8c5d92c.png)
Once saved the changes and assigned the full grade to the correct answer, we can preview the question to see how it works.
![Example of a text question asking to convert a decimal number into hexadecimal](../../image/uuid-cad46829-39b6-3d20-ea63-25fc96e0f062.png)