-
MathType
-
WirisQuizzes
-
Nubric
-
CalcMe
-
MathPlayer
-
Store FAQ
-
MathFlow
-
BF FAQ
-
Miscellaneous
-
Wiris Integrations
Get started with Algorithm Mode in Nubric
Reading time: 2minGet started with Algorithm Mode in Nubric by extending a randomized fraction addition question. You will learn how to control the generated values so that the fractions students receive are already irreducible, while keeping the correct answer linked to those values.
See it in action
Follow the steps
Start with a fraction addition question that uses random variables. Follow the video to introduce conditions that give you more control over the fractions generated.
Step 1 — Open your randomized question
- Open the quiz containing your randomized fraction addition question and select the question.
- Review the variables used in the question statement and the expression used to calculate the correct answer.
- Use Preview question and Regenerate question to inspect different versions. With basic random numbers, the generated fractions may not always be irreducible.
If you have not created a randomized question yet, start with Create a randomized fraction addition question. This tutorial introduces random numbers, random expressions, and a correct answer that changes with the generated values.
Step 2 — Enable Algorithm Mode
- Under Advanced options, open Question Settings and the Random variables editor.
- Enable Algorithm mode to work with the logic that generates your question variables.
- Identify the variables used for the numerators, denominators, and solution before changing the generation rules.
Step 3 — Control the generated fractions
- Follow the example to generate a numerator and restrict its possible denominators to values that are coprime to it. Two numbers are coprime when their greatest common divisor is 1.
- Apply the same condition to the second fraction so that both fractions are irreducible before students add them.
- Calculate the solution from the generated fractions and reference that solution in the correct-answer field.
- Save your changes.
Generating irreducible fractions and requiring a simplified student answer are separate settings. Algorithm Mode controls the values in the question; Evaluation options control which student answers are accepted. To require a simplified answer, see Require simplified answers in a fraction addition question.
Step 4 — Test your question
- Open Preview question and check that each generated fraction is irreducible.
- Solve the exercise and submit your answer to check the evaluation.
- Click Regenerate question several times. Check that the fractions change, continue to meet your conditions, and have a matching correct answer.
You now have a randomized question with controlled fraction generation. You can apply the same approach to other exercises that need specific mathematical conditions.
Next steps
To explore another way to build your quiz collection, watch Get started with the Nubric Content Bank to discover how to find, reuse, and share quizzes.
To continue working with algorithms, explore Advanced Logic in Nubric. You can continue with:
- Understanding Advanced Logic in Nubric — Learn how variables, conditions, and calculations work together to generate questions with controlled mathematical properties.
- Common Patterns and Best Practices — Learn how to organize variable generation, mathematical conditions, and solution calculations into clearer algorithms.
- Advanced Logic Examples in Nubric — Explore worked examples you can adapt to your own questions, including equations with rational solutions, exact divisions, and right triangles with integer sides.
- How to generate two random irreducible fractions — Follow the full algorithm to generate irreducible fractions with different denominators and calculate their sum.