-
MathType
-
Wiris Quizzes
-
Learning Lemur
-
CalcMe
-
MathPlayer
-
Store FAQ
-
VPAT for the electronic documentation
-
MathFlow
-
BF FAQ
Variables from the answer
Reading time: 1minRandom lineal system resolution
We will create a question asking the students for the system's A·x=b solution, being A a random 3x3 matrix and b a random vector. First, we need to write the algorithm of the question in a similar way as the last one.
The question's solution will be given in the following way.
Notice the possibility of the answer vector xnot being in integer form. Theoretically, this should not be a problem for the students, but we can be interested in an integer answer to make the calculus made by the students less tedious. In order to solve this problem, we can define A as a matrix with determinant 1 as we can see in the next example.
Thus, even though we manage to arrange the problem, we are generating a random matrix since we find one with determinant 1, which is very inefficient. In order to optimize our algorithm, we should change our approach to the question. Instead of defining randomly the matrix A and the vector b, we will define our solution and then find an integer matrix A and an integer vector b satisfying A·x=b.
This new perspective about how we are defining the question's random parameters will allow us to control how the student answer is going to be.
Caution
Recall we need to precede the name of a variable with the pound sign #
every time we want to call it outside CalcMe. Thus, we must write #sol
in the correct answer tab and #A
, #b
in the statement.
Random polynomial roots
We will create a question asking the students for the roots of a random polynomial with a random degree. First, we need to write the algorithm of the question.
Notice that the algorithm could generate unwanted polynomials, whether it lacks real roots or the difficulty of finding them by hand, as we can see in the following example.
Tip
You can find more detailed information about answers in lists or sets mode here.
In order to arrange it, we can define the polynomial as a product of its roots, as in the example below.
This way, all the polynomial roots are integers, and the students will be able to find them as we can see then.
Caution
Recall we need to precede the name of a variable with the pound sign # every time we want to call it outside CalcMe. Thus, we must write #sol in the correct answer tab and #p in the statement.