## D2L - Creating Arithmetic Questions (UW-Madison)

**Note:**

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

**Assignments**drop-down menu in the navigation bar, and then

**Quizzes.**

**Question Library**tab.

**button, then**

**Arithmetic Question**.

**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

**Question Text**field. Enclose any variables in curly braces "{ }".(E.g., "What is the sum of {x} and {y}?")

**Formula**and the

**Variables**(see sections below).

**(or**

**Preview**, to see the question before it is saved).

## Formula

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)

**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.

## Variables

- Name – the name of the variable is entered here (e.g., "x"). Variable names are case-sensitive and limited to 1 or 2 characters.
- Min – the minimum value of the variable.
- Max – the maximum value of the variable.
- Decimal places – the number of decimal places shown for a variable (Used if decimals are used in the min/max or Step value).
- 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.)

**Add Variable**. To delete a variable, select

**Remove**by the variable.

*Source: Desire2Learn*