Documentation / LearningLemur

  • Demos
  • Visit our website
  • Contact us
  • MathType

    • Wiris Quizzes

      • Learning Lemur

        • CalcMe

          • MathPlayer

            • Store FAQ

              • VPAT for the electronic documentation

                • MathFlow

                  • BF FAQ

                    • Miscellaneous

                      • Home
                      • Learning Lemur
                      • Basic guide to Learning Lemur
                      • Using advanced logic
                      • Using advanced logic

                      Introduction

                      Reading time: 2min

                      This powerful feature allows you, as an educator, to craft dynamic and sophisticated logical conditions by leveraging the flexibility and expressiveness of CalcMe code. Moving beyond standard logic options, you can now seamlessly handle random values, complex criteria, and custom conditions directly within your educational content.

                      With Advanced Logic, you're empowered to:

                      • Precisely control the generation of random values.
                      • Define detailed conditions to exclude specific outcomes or ensure desired properties (for example, guaranteeing positive solutions, excluding integer results, or enforcing range limits).
                      • Create intricate, customized relationships between values and expressions.

                      All this is made possible through CalcMe, a powerful programming language already integrated within Wiris products. Even if you're new to programming, CalcMe offers a straightforward approach to defining precise logical constraints without the complexity often found in traditional programming languages.

                      👉Need some examples of Advanced Logic code? Check out Examples section for more details!

                       

                      How to use it

                      Unlocking the power of Advanced Logic is straightforward. Follow these steps to start creating dynamic and precise questions.

                      Enabling Advanced Logic

                      1. Enabling Advanced Logic: First, open the random variables modal in the question editor. Here, you'll find a new toggle switch labeled “Advanced Logic”. Simply click this toggle to activate the feature. Once enabled, you will see a code input box appear, ready for your custom logic.
                      2. Writing your code: This input box is where you will define your logical conditions using CalcMe. CalcMe's syntax is designed to be intuitive, even if you have little to no programming experience. You can define variables and set the conditions they must meet. 
                      3. Saving and using your variables: Once you are satisfied with your logical conditions, click the “Save Changes” button. The random variables and expressions you have defined will now be available to use throughout the question's statement and answer fields, just like any other variable.

                      Remember: Now that you've saved your variables, you're ready to use them! Just remember one important detail: always add a hash (#) before the variable name in your text.

                       

                      FAQs

                      I already have my logic built in a CalcMe worksheet. How can I use it in Learning Lemur?

                      You can easily convert an existing CalcMe worksheet into code that is compatible with the Advanced Logic feature.

                      1. In your CalcMe worksheet, find and click the Transform sheet to code button.
                      2. This action will generate the code that represents your entire worksheet.
                      3. Copy the generated code.
                      4. Paste it directly into the Advanced Logic input box in Learning Lemur.

                      Your logic is now ready to be used in your question!

                       
                       

                      What if my CalcMe code is in a language other than English (e.g., Spanish, French)?

                      The Advanced Logic feature in Learning Lemur only supports CalcMe code written in English.

                      However, you can use CalcMe itself to translate your code automatically before you copy it.

                      1. Open your worksheet in CalcMe.
                      2. Navigate to your user Settings.
                      3. Change the language setting to English.
                      4. You will notice that the code on your worksheet instantly and automatically translates to the English syntax.
                      5. Now, simply copy this translated English code and paste it into the Advanced Logic input box in Learning Lemur.
                       
                       

                       

                       

                      Was this article helpful?

                      Yes
                      No
                      Give feedback about this article

                      Related Articles

                      • Can't change the font of a MathType equation number
                      • An extra space is inserted after inline equations
                      • Example 1: Equation of a line

                      Introduction

                      How to use it Enabling Advanced Logic FAQs I already have my logic built in a CalcMe worksheet. How can I use it in Learning Lemur? What if my CalcMe code is in a language other than English (e.g., Spanish, French)?

                      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