Documentation / LearningLemur

  • Demos
  • Visit our website
  • Contact us
  • MathType

    • WirisQuizzes

      • LearningLemur

        • CalcMe

          • MathPlayer

            • Store FAQ

              • VPAT for the electronic documentation

                • MathFlow

                  • BF FAQ

                    • Miscellaneous

                      • Wiris Integrations

                        • Home
                        • LearningLemur
                        • Using LearningLemur
                        • Creating Questions in LearningLemur
                        • Creating Questions in LearningLemur

                        Create a randomized fraction addition question

                        Reading time: 3min

                        In this tutorial, you'll learn how to create a randomized math question using variables and computed answers.

                        Outcome: By the end of this tutorial, you will create a fraction addition question whose fractions are generated randomly each time a student attempts the exercise.

                        Before you begin

                        Prerequisites 

                        • You should be comfortable working with basic fractions and have access to a LearningLemur-enabled course
                        • You should have completed Create an open-answer fraction addition question

                        Requirements

                        • A teacher account with permission to create questions in LearningLemur, accessed through learninglemur.com or your LMS

                        Step 0 — Create or open a quiz

                        Why: LearningLemur organises all questions inside quizzes, so creating a quiz first provides the workspace where you will add and manage your questions.

                        1. Open LearningLemur
                        2. Open an existing quiz or create a new one

                        Checkpoint: You should now see the quiz workspace with options to add questions.

                        Step 1 — Add a new question

                        Why: LearningLemur allows you to create questions either manually or with the help of AI. In this tutorial, we will create the question manually to understand how the editor works.

                        1. Inside the quiz, click Add question
                        2. In the creation dialog, choose Manually
                        3. Select the Open answer question

                        This question type allows students to enter a mathematical expression using the math editor.

                        Checkpoint: You should see the Open Answer question editor, including fields for the title, statement, and answers.

                        Step 2 — Write the question statement

                        Why: The statement explains the problem students must solve. It will use variables instead of fixed values.

                        1. Enter a Question title, for example: Sum of two random fractions
                        2. In the Question statement, write the exercise text (these letters will later be defined as random variables)
                        Question statement with the exercise text involving random parameters

                        You can use the MathType editor to format fractions using mathematical notation.

                        Checkpoint: The question statement should display the variables inside the fraction expression.

                        Step 3 — Define the random variables

                        Why: Random variables allow LearningLemur to generate a different version of the question each time.

                        1. Open Question settings
                        2. Locate the Random variables section
                        3. Add the following variables:
                        Variable Value
                        num1 random integer from 1 to 9 in steps of 1
                        den1 random integer from 2 to 9 in steps of 1
                        num2 random integer from 1 to 9 in steps of 1
                        den2 random integer from 2 to 9 in steps of 1

                        These variables will define the numerators and denominators of the two fractions.

                        Checkpoint: The variables should appear listed in the Random variables section.

                        Step 4 — Define the random expression (solution)

                        Why: Instead of defining the answer directly, LearningLemur allows you to compute the correct result using a random expression based on the generated variables.

                        1. In the Random variables panel, go to Random expressions
                        2. Click Add random expression
                        3. Create the following expression:

                        This expression calculates the result of the fraction addition using the random values. LearningLemur automatically evaluates this expression and simplifies the result using the mathematical engine.

                        When building randomized questions, it is recommended to compute intermediate results using Random expressions, and reference them later in the Answers section. This keeps the question logic clearer and makes the question easier to maintain and modify.

                         

                        Checkpoint: The variable sol should appear under Random expressions.

                        Step 5 — Define the correct answer

                        Why: LearningLemur needs to know the expected solution in order to evaluate student responses.

                        1. Scroll to the Answers section
                        2. In the first answer field, enter the expression #sol
                        3. Mark this answer as a Correct answer
                        Correct answer for the exercise (the aforementioned random expression)

                        Using #sol ensures the answer corresponds to the computed result of the random expression. LearningLemur will compare student responses with this expression using the mathematical evaluation engine.

                        Checkpoint: You should see the answer marked as a correct answer (100%).

                        Step 6 — Configure the evaluation

                        Why: Evaluation options determine how student answers are compared with the correct solution.

                        1. Click Edit in the Evaluation options section
                        2. Ensure Mathematically equal is selected
                        Evaluation criteria options: mathematically equal is selected

                        This allows LearningLemur to accept equivalent expressions.

                        You can also require the answer to be simplified or to be expressed in decimal form. You can see how to do so here.

                         

                        Checkpoint: The evaluation summary should display something similar to:

                        Evaluation options summary

                        Step 7 — Preview the question

                        Why: Previewing allows you to verify that the question generates different values and that LearningLemur evaluates the corresponding result correctly each time.

                        1. Click Preview question
                        2. Note the fraction values generated in the question
                        3. Use Fill with correct answer, or calculate the result manually from the values shown
                        4. Submit the answer
                        5. Click Regenerate question and compare the newly generated values with the previous ones
                        Preview of the question with a correct answer

                        LearningLemur automatically saves your changes while you edit the question. You do not need to manually save the question.

                         

                        Checkpoint: Each preview can yield different fractions, and the correct answer is evaluated based on the values shown in that preview.

                        You're done

                        You have created your first randomized math question in LearningLemur. You learned how to:

                        • Define random variables
                        • Compute answers dynamically
                        • Evaluate expressions based on generated values

                        Next, you can continue learning with the following tutorials:

                        • Create an area question with units
                        • Create a randomized geometry question
                        • Configure partial scoring for units

                        You can also create more complex randomized questions using advanced logic. For example, you can ensure that each generated fraction is already irreducible (i.e., simplified before the operation). You can find more details here.

                         

                        Troubleshooting

                        The same values always appear in the preview

                        Check that the question uses random variables in the statement and that the correct answer is based on a random expression, not on a fixed value.

                        The correct answer is marked as incorrect

                        Check that:

                        • The answer rule points to the computed expression (for example, #sol)
                        • The random expression is written correctly
                        • The evaluation option is set to Mathematically equal, not Literally equal

                        The question shows variables instead of numbers

                        Check that the variables used in the statement are defined in the Random variables section, and you are preceding them in the statement with the # symbol.

                        Was this article helpful?

                        Yes
                        No
                        Give feedback about this article

                        Related Articles

                        • Sum of two fractions: simplified answer
                        • Examples
                        • Basic Guide to Question Creation with WirisQuizzes

                        Create a randomized fraction addition question

                        Before you begin Prerequisites Requirements Step 0 — Create or open a quiz Step 1 — Add a new question Step 2 — Write the question statement Step 3 — Define the random variables Step 4 — Define the random expression (solution) Step 5 — Define the correct answer Step 6 — Configure the evaluation Step 7 — Preview the question You're done Troubleshooting The same values always appear in the preview The correct answer is marked as incorrect The question shows variables instead of numbers

                        Making people’s STEM work more meaningful

                        MathType

                        • MathType for Office Tools
                        • MathType for Mac
                        • MathType for Microsoft 365
                        • MathType for Google Workspace
                        • MathType for LMS
                        • MathType for XML Editors
                        • Arabic notation
                        • Our products accessibility
                        • MathType is online

                        WirisQuizzes

                        Learning Lemur

                        Solutions for Education

                        • Blackboard Learn
                        • Brightspace by D2L
                        • Canvas
                        • Google Classroom
                        • Moodle
                        • Schoology

                        Solutions for Publishing Houses

                        Solutions for Technical Writers

                        Solutions for Chemistry

                        Integrations

                        • HTML Editors
                        • MathType in WordPress

                        Pricing

                        Company

                        Careers

                        Blog

                        Contact Us

                        Buy Now

                        Plugin Downloads

                        © Wiris 2025

                        • Cookie Settings
                        • Cookie Policy
                        • Terms of Use
                        • Privacy Policy / GDPR
                        • Student Data Privacy
                        • Compliance
                        • Powered by Helpjuice
                        Expand