Example: Simplify random fractions

This example uses Fill in the Blanks to create a random exercise about simplifying fractions. The fraction is different each time you start a new exercise.


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 generate proper fractions that can be simplified. A proper fraction is a fraction with numerator smaller than the denominator, such as 23\frac{2}{3}. We will multiply the numerator and denominator with a common factor to generate a fraction that can be simplified. For example, 2×53×5=1015\frac{2\times5}{3\times 5} = \frac{10}{15}.

So we need the following exercise parameters:

  • to generate a proper fraction, we need two numbers c1c1 and c2c2 with c2>c1c2>c1.
  • we choose the common factor in the range 2 to 9.
  • the numerator of our fraction is then factorc1factor\cdot c1 and the denominator is factorc2factor\cdot c2.

Create the exercise parameters as follows:

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

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

  • Create a random number between 2 and 9 with name factorfactor. Create exercise parameter for the common factor

  • Similarly, add two exercise parameters c1c1 and c2c2 with c2>c1c2>c1. These will be the numerator and denominator of the proper fraction. Create exercise parameter for the proper fraction

  • Now we create the numerator and denominator of the fraction. Add a new exercise parameter of type Expression with name numeratornumerator. In the Expression field, type factorc1factor\cdot c1. To let Algebrakit evaluate the multiplication, set the Process option to Simplify. Create exercise parameter for the numerator

  • Create the exercise parameter for the denominator in the same way. Create exercise parameter for the denominator

The result is as follows: The exercise parameters for this exercise

Create the instruction

Enter the student instruction in the instruction text editor. The instruction for this exercise

Select the Fill in the Blanks question type

Next, select the Fill in the Blanks question type. Select the Fill in the Blanks question type

Configure Fill in the Blanks

  • Use the formula editor button f(x)f(x) to insert the random fraction in the text editor. Add the fraction to the text editor

  • Click on R1R_1 below the text editor to configure the input field. Click on the white bar below Task and input the expression numeratordenominator\frac{numerator}{denominator}. Configure the input field

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

Live example

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