Wiris

Documentation / WirisQuizzes

  • Demos
  • Visit our website
  • Contact us
  • MathType

    • WirisQuizzes

      • LearningLemur

        • CalcMe

          • MathPlayer

            • Store FAQ

              • MathFlow

                • BF FAQ

                  • Miscellaneous

                    • Wiris Integrations

                      • Home
                      • WirisQuizzes
                      • Advanced Validation Features
                      • Basic use of random variables
                      • Basic use of random variables

                      Example: Volume of a cylinder

                      Reading time: 1min

                      Let us create an essential question asking to calculate a cylinder's volume given its base's radius and height.

                      The Basic Mode allows us to retrieve a random integer number in a given interval. We need two random numbers: on for the base's radius and one for the cylinder's height, which we will call r, and h (the name of the variables is essential, as we will see later on). We need to click on the Add variable button to add them.

                      Now, we need to define the correct answer in the corresponding input field, considering that it's not a number. As you may see, the evaluate() command will be automatically displayed there to be used if we want our solution to be computed.

                      If we directly write the correct answer without the evaluate() command, the result showed to the student as the expected answer will appear without any performed calculus. Both options are valid, but we prefer to display the final fraction when the students answer the question in this example. Conversely, that's what it would be displayed.

                      Finally, we can test the question's behaviour in the Test the question section. There, we can try some possible answers and check everything works as expected.

                       

                      Was this article helpful?

                      Give feedback about this article

                      Related Articles

                      • Convert grams to number of moles and particles
                      • Roots of a polynomial
                      • Equation

                      Empowering STEM education

                      MathType

                      • Office Tools
                      • LMS
                      • XML
                      • HTML

                      WirisQuizzes

                      Learning Lemur

                      Integrations

                      Solutions

                      • Education
                      • Publishing houses – platforms and interactive
                      • Publishing houses – Print and digital
                      • Technical writers

                      Pricing

                      Downloads

                      Blog

                      • Success stories

                      About us

                      • Careers
                      • Partnership

                      Contact Us

                      Contact Sales

                      European union (European Regional Development Fund) and 1EdTech (TrustEd Apps Certified)
                      • Cookie Policy
                      • Terms of Use
                      • Privacy Policy / GDPR
                      • Student Data Privacy
                      • Compliance
                      • Cookie Settings

                      © Wiris 2026

                      Expand