Documentation / WirisQuizzes

  • 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
                      • Wiris Quizzes
                      • Getting Started
                      • Basic Guide to Question Creation with WirisQuizzes
                      • Basic Guide to Question Creation with WirisQuizzes

                      Penalization for forgetting the units

                      Reading time: 3min

                      In the previous examples, we have mentioned it is possible to penalize students' grades if they forget to write the units. Let's create a random question as before but

                      Students will get 100% of the score if they write the area of the rectangle with the correct units.

                      Students will get 50% of the score if they write the area of the rectangle without units.

                      Select the question type

                      First, we need to select which type of question we will use. As above, the best of the possible options for this question is Short answer because we expect the student to answer with just the result.

                      Create random numbers

                      Before writing the statement, let us write the algorithm of the question. Open WirisQuizzes Studio by clicking

                      The Basic Mode allows us to retrieve a random integer number in a given interval. We need two random numbers: one for the rectangle's base and one for the height. We will name these variables b and h, respectively. As we've seen in previous examples, the variables' names are essential. We need to click on the Add variable button to add them.

                      Now we have two random units whose magnitude is between 1 and 9, inclusive. That is all we have to do regarding the generation of the random variables.

                      Tip

                      If you want to see more details regarding the Basic Mode of defining random variables, you can see its detailed page here.

                      Write the correct answer

                      Now, we need to define the correct answer in the corresponding input field, considering that the answer is not a number now. As you may see, the evaluate() command will be automatically displayed there to be used if we want our solution to be computed. Since the variables don't have units, we'll include them here.

                      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.

                      Enable units of measure

                      Go to the Input options section and check the units of measure and prefixes you are interested in under Input syntax. In this case, you have to select, at least, m (for the unit meters) and c (for the prefix centi).

                      Note that now both c (centi) and m (meters) are coloured blue because they are selected as explained above to be understood as a metric prefix and a unit, respectively.

                      Preview the question and save the changes

                      It is always a good practice to test how they behave using the Test this question section, even with simple questions. We can check that all the correct answers the student may provide are accurate. Moreover, we can see if the students forget to write the units, they will get zero points.

                      Note

                      We have another button next to the correct answer in the Preview tab: This button appears because our algorithm deals with randomness. Every time we click this button, the algorithm will be re-executed, and the random numbers will change.

                      Once you have finished testing the question, go back to the home page and click so changes are saved, and the WirisQuizzes Studio window closes.

                      Assign full grade

                      Assign the full grade to the correct answer. Note the answer has units.

                      Write the statement

                      We have to write the statement of the problem. Recall we have stored the base length and height in two variables called b and h, respectively. Therefore, as for the correct answer, we have to write the name of the variables preceded by the pound symbol #. We also have to include the units in the statement since the variables are just numbers, not quantities.

                      Finally, save the question by clicking Save and continue editing.

                      Penalization to those who forget the units

                      Until now, this question has behaved exactly the same as the previous one. Therefore, let us add the penalization to those students who forget to write the units.

                      Click Blank for another choice, so a new possible answer shows.

                      Open WirisQuizzes Studio in Answer 2:

                      Notice everything is the same as before except that the Correct answer editor is empty now. Provide the correct answer as back but do not write the units.

                      Save the changes by clicking , and assign 50% of the score to the second answer so the Answers field looks like

                      Tip

                      We are saying here: if the answer matches the criteria of Answer 1, the student will get 100% of the score. If instead, the response matches the requirements of Answer 2, the student receives 50% of the score. If the answer matches neither the criteria for Answer 1 nor Answer 2, the student gets no credit.

                      Save the changes and preview the question

                      Finally, save the changes.

                      And preview the question.

                      A new window will show up with the question shown as the student will see it. Then we can test the behaviour of the question again.

                      Every time we preview the question, the numbers will appear will be different.

                      Was this article helpful?

                      Yes
                      No
                      Give feedback about this article

                      Related Articles

                      • Units and currencies
                      • Precision
                      • Format expressions
                      • Match the plot

                      Penalization for forgetting the units

                      Select the question type Create random numbers Tip Write the correct answer Enable units of measure Preview the question and save the changes Note Assign full grade Write the statement Penalization to those who forget the units Tip Save the changes and preview the question

                      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