D2L - Creating Arithmetic Questions (UW-Madison)


UW-Madison is adopting Canvas as the single, centrally supported learning management system, and discontinuing support for Desire2Learn (D2L) and Moodle. Access to D2L and Moodle will permanently end June 1, 2018. For information about retaining materials from D2L or Moodle, please refer to this document.

This document describes how instructors can create arithmetic questions in the Learn@UW Question Library.

Creating a new Arithmetic Question in the Question Library

1. Start by clicking on the Assignments drop-down menu in the navigation bar, and then Quizzes.
2. Click on the Question Library tab.
3. Click on the New.jpg button, then Arithmetic Question.
4. Give the new question a title (optional) and assign the desired values to Points and Difficulty. Under the relevant option, you may also:
  • Image: Add an image to the question
  • Question Hint: Add a hint to the question
  • Question Feedback: Give users feedback after answering the question
5. Enter the question text in the Question Text field.  Enclose any variables in curly braces "{ }".(E.g., "What is the sum of {x} and {y}?")
6. Enter the Formula and the Variables (see sections below).

When finished, click Save.jpg (or Preview, to see the question before it is saved).



The Formula field is where you will combine the variables with mathematical operators, functions, and constants to calculate the answer to the question. As before, all variables must be enclosed in curly braces. (e.g.,. 2 * {x} + {y} – {z}).

Available Operators:

+ , – , * , / Addition, Subtraction, Multiplication, Division
{x} ^ {y} x to the power of y
{x} % {y} x modulo y
{x} \ {y} x / y truncated to integer value

Available Functions:

abs({x}) Absolute value of x
atan({x}) Arctangent of x (in radians)
cos({x}) Cosine of x (in radians)
cosec({x}) Cosecant of x (in radians)
cotan({x}) Cotangent of x (in radians)
factorial({n}) Factorial of n, n! (n must be integer valued)
ln({x}) Logarithm to the base e of x
log({x}) Logarithm to the base 10 of x
sec({x}) Secant of x (in radians)
sin({x}) Sine of x (in radians)
sqr({x}) Square root of x
tan({x}) Tangent of x (in radians)

The following constants are available:

PI – 3.14159 (accurate to 50 decimal places)
e   – 2.71828 (accurate to 50 decimal places)

The following options are available under Formula:
  • The Test button will cause the variables to be tested in the formula and the potential solutions will be displayed.
  • The Answer Precision field allows you to specify the number of decimal places you would like the answer to be within.
  • The Tolerance field allows you to set the number (+/-) of units/percent the answer is allowed to be within.
  • The Units field allows you to specify units for the answer (if desired). The field can optionally be case sensitive. Correct units can (optionally) be designated as a certain percentage of the score.


  1. Name – the name of the variable is entered here (e.g., "x"). Variable names are case-sensitive and limited to 1 or 2 characters.
  2. Min – the minimum value of the variable.
  3. Max – the maximum value of the variable.
  4. Decimal places – the number of decimal places shown for a variable (Used if decimals are used in the min/max or Step value).
  5. Step – the increment taken within the min and max values. (e.g., if Min = 100, Max = 200, and Step = 5, then the values { 100, 105, 110, 115, ...200 } will be used.)
To add more variables, select Add Variable. To delete a variable, select Remove by the variable.

Source: Desire2Learn

Keywords:Learn@UW learnuw desire2learn d2l Quizzing Arithmetic Question Type library math mathematics functions equations operators   Doc ID:2216
Owner:Learn@UW Madison .Group:Learn@UW Madison
Created:2003-09-03 19:00 CDTUpdated:2017-12-01 12:21 CDT
Sites:DoIT Help Desk, Learn@UW Madison, Learn@UW Utility
Feedback:  9   7