Example: Subtracting random numbers

This example uses Written Arithmetic to create an exercise for multi-digit subtraction. The numbers are different each time the exercise restarts.

Prepare

Use your content management system to start a new Algebrakit question. If you don't have access to Algebrakit, you can use the Algebrakit Testbench.

Adjust the student profile in the top bar to best match the students that will answer this question. Selecting the student profile Figure: Selecting the student profile

Set up random exercise parameters

We will let Algebrakit select one number between 100 and 999. The second number must be smaller than the first to guarantee a positive solution.

  • Add the Randomization panel to the top bar using the gear icon on the left. Open the Randomization panel Figure: Open the Randomization panel.

  • In the panel, click '+ Add exercise parameter'. Add an exercise parameter Figure: Add an exercise parameter.

  • Set the name and range for the first number.

  • Click '+ Add exercise parameter' again to add the name and range of the second number. The exercise parameters Figure: The exercise parameters.

Create the instruction

Enter the student instruction in the instruction text editor. Click the formula button f(x)f(x) to insert the calculation num1num2num1-num2. Algebrakit will replace the variables num1num1 and num2num2 by their random values when the exercise starts.

Enter the student instruction Figure: Enter the student instruction.

Select the Written Arithmetic question type

Next, select the Written Arithmetic question type. The buttons are replaced by a form to configure Written Arithmetic.

Select the Written Arithmetic question type Figure: Select the Written Arithmetic question type.

Configure Written Arithmetic

  • Choose problem type Subtraction using the short form.
  • Enter the problem numbers num1num1 and num2num2, in that order.
  • In Show problem numbers, choose whether the problem numbers should already be visible when the problem starts.
  • Enable Show problem operator if you want the subtraction symbol should already be visible when the problem starts.
  • Enable HTO place value to show a place value ribbon at the top.

Configure Written Arithmetic Figure: Configure Written Arithmetic.

Test the exercise

Press the Test button to see an interactive example and a generated solution for the exercise. Press the Test button again to generate a new example with different random numbers.

Test the exercise Figure: Test the exercise.

Live example

You can try the exercise below. Press the Edit button to experiment with this question in the Testbench.