-
MathType
-
Wiris Quizzes
-
Learning Lemur
-
CalcMe
-
MathPlayer
-
Store FAQ
-
VPAT for the electronic documentation
-
MathFlow
-
BF FAQ
Area of a random rectangle
Reading time: 3minConsider the question in the previous example. Imagine we want to include that question on a quiz. All the students will see the same question with the exact dimensions! Wouldn't it be nice to have a different question for each student? This is possible with a simple command in WirisQuizzes
The idea is to generate two random numbers for base and height, so every time a student opens the question, there will be different numbers in the statement.
And what about the correct answer? Do we need to assign a correct answer to each possible case? Of course not! We will treat measures as variables, evaluate their product inside CalcMe so it will do the computations for us, and then we set as correct answer the result.
Select the question type
First, we need to select which type of question we will use. Among all the possible options, the best one here is Short answer because we expect the student to answer with just the result.
Create random numbers
Before writing the statement, let us write the algorithm of the question. Open WirisQuizzes Studio by clicking
The Basic Mode allows us to retrieve a random integer number in a given interval. We need two random numbers: one for the rectangle's base and one for the height. We will name these variables b and h, respectively. As we've seen in previous examples, the variables' names are essential. We need to click on the Add variable button to add them.
Now we have two random units whose magnitude is between 1 and 9, inclusive. That is all we have to do regarding the generation of the random variables.
Tip
If you want to see more details regarding the Basic Mode of defining random variables, you can see its detailed page here.
Write the correct answer
Now, we need to define the correct answer in the corresponding input field, considering that the answer is not a number now. As you may see, the evaluate()
command will be automatically displayed there to be used if we want our solution to be computed. Since the variables don't have units, we'll include them here.
If we directly write the correct answer without the evaluate() command, the result showed to the student as the expected answer will appear without any performed calculus. Both options are valid, but we prefer to display the final fraction when the students answer the question in this example. Conversely, that's what it would be displayed.
Note
Recall the student will see the same math editor as we do where we write the correct answer or in the Test the question section, so it is essential for either the Math editor embedded or Math editor in popup option to be selected.
Enable units of measure
Go to the Input options section and check the units of measure and prefixes you are interested in under Input syntax. In this case, you have to select, at least, m
(for the unit meters) and c
(for the prefix centi).
Note that now both c (centi) and m (meters) are coloured blue because they are selected as explained above to be understood as a metric prefix and a unit, respectively.
Preview the question and save the changes
It is always a good practice to test how they behave using the Test this question section, even with simple questions. We can check that all the correct answers the student may provide are accurate. Moreover, we can see that if the students forget to write the units, they will get zero points.
Note
We have another button next to the correct answer in the Preview tab . This button appears because our algorithm deals with randomness. Every time we click this button, the algorithm will be re-executed, and the random numbers will change.
Once you have finished testing the question, go back to the home page and click to save changes and WirisQuizzes Studio window closes.
Assign full grade
Assign the full grade to the correct answer.
Write the statement
We have to write the statement of the problem. Recall we have stored the base length and height in two variables named b and h, respectively. Therefore, as for the correct answer, we have to write the name of the variables preceded by the pound symbol #. We also have to include the units in the statement since the variables are just numbers, not quantities.
Finally, save the question by clicking Save changes and continue editing.
Student view
Now, we should be able to preview the question. Click Preview.
A new window will show up with the question shown as the student will see it. Then, we can test the behaviour of the question again.
Every time we preview the question, the numbers in the statement will be different.