Student variable

One of the settings in the algebra interaction type is that you can change the type of the step to student variable.

By default, a step name is only used by the author and not visible to the student. In case you check the student variable setting, the student will be able to use the step name as variable name for the calculations in the interaction related to that step.

In questions that involve algebra or physics such a step often relates to a variable that the student uses. Examples are:

  • the variables a and b in the linear formula y=a x+b, which represent the slope and the offset. 
  • the symbols \angle{A}, \angle{B} and \angle{C} in the formula \angle{A}+\angle{B}+\angle{C}=180 \degree
  • the physical quantities E, m and v in the formula E=\frac{1}{2}m v^2, which represent energy, mass and velocity.

By declaring the step name a student variable, the student can write such algebraic expressions and AlgebraKiT will evaluate it as a correct step.


As an example, we will create the exercise:

Find the formula of the straight line through the points (0,4) and (2,8).

  • Create a new exercise and enter y=a x+b as task for the solution step.
  • Create a new step with the following settings 
    • name ‘a’
    • description ‘the slope’
    • task simplify (8-4)/2
  • Create another step with settings:
    • name is ‘b’
    • description ‘the offset’
    • task simplify 4

The resulting interaction behaves as follows:

Note the following:

  • variables a and b do not occur in the worked out solution
  • the student input y = a x+b is not accepted

Let’s now make variables a and b so-called student variables.

Check the box student variable for both steps in the step menu (by clicking the triangle next to the step name).

Run the exercise again and see how variable a and b show up in the worked-out solution and how they can be used by the student.

Note that a student is now able to use the step names as variables, both in the student input for the steps as well as for the definition of the solution step.

Was this helpful?

0 / 0

However, you can’t simply use this setting for each task. It only works when the task result is a simple, single answer.

Note: when selecting a task like solving equations, you are not able to make the step a student variable in case the solution of the step has multiple answers. An answer of form p=0 \vee p=2 can never be the result of a student variable step p. In that case either a domain has to be added to restrain the result to a single answer, or the stepname has to be changed to a regular stepname and the student variable checkbox needs to be deselected.

In case you have checked the student variable checkbox and the result of the task is not a simple single answer, we can not guarantee a correct working of AlgebraKiT.

Note 2: It is not possible to use a student variable for a step which is using a variable that is already used in a task definition of another step, for which that step again is used in the task definition of the new student variable. For example: when student variable step f(x) is defined as x^2+a, you can not define student variable step a as solving equations f(3)=0 for a. This gives a solution model loop (a needs to be resolved before f(x) can be determined, but f(x) needs to be resolved before a can be determined).

Was this helpful?

0 / 0