Create Fraction Questions

You can create numerical questions that require your students to answer with a fraction.

Note: Because fraction questions set numerical tolerance to 0, students cannot enter decimal approximations. For example, 0.33333 is not the same as 1/3.
  1. Click Questions > Create.
    The Question Editor opens.
  2. In Name, type a name for the question.
  3. In Mode, select Numerical.
  4. In Question, type your question.

    Use the answer placeholder string <_> to specify where the answer box should be displayed.

  5. Set grading and display options for the answer box.
    Option Begin Answer With: Notes
    Require student to specify a fraction, integer, or decimal
    <EQN $FRACTION=1; ''>
    Requires answers to take one of the following forms:
    • integer (example: 64)
    • exact decimal (example: 6.4)
    • any fraction (example: 6/4)

    This option also sets the numerical tolerance to 0.

    Require student to specify a reduced fraction or integer
    <EQN $PROPERFRACTION=1; ''>
    Requires answers to take one of the following forms:
    • integer (example: 64)
    • reduced fraction (example: 3/2)

    This option also sets the numerical tolerance to 0.

    Best Practice: Include <p:reduce> in Question to let your students know to reduce fractions.
    Make the answer box n characters wide
    <EQN $size=n; ''>
    By default, the answer box is 10 characters wide.

    Changing the size of the answer box does not restrict the length of your students' responses.

    You can combine these declarations using a single <EQN> tag by separating each declaration with a semicolon.

    For example:

    <EQN $PROPERFRACTION=1; $size=20; ''>
  6. In Answer, specify the answer using the fraction function in the <EQN> tag using the following syntax:
    fraction(numerator,denominator)

    For example:

    <EQN $PROPERFRACTION=1; fraction(13,16)>

    The fraction function ensures that your answer key is correctly parsed as a fraction, not as the decimal quotient of the numerator and denominator.

    Do not use commas, spaces, or other separators between digits.

  7. Optional: Type a Solution.

    The solution helps your students understand the steps they need to take to determine the correct answer to the question. Your assignment settings specify when to show the solution.

  8. Click Test/Preview to test the appearance and behavior of the question. See Test Questions.
  9. Click Redisplay to show certain kinds of errors in the Display section of the Question Editor. Make any needed changes to your question.
  10. Optional: Click Show Additional Information and change the question's sharing permission or add descriptive information.
    • By default, other instructors can use your question only if you provide them with the question ID, and only you can edit the question or find it in search results. To change the permission, see Share Questions With Other Instructors.
    • If you make your question publicly available, you might want to provide descriptive information to help others search for it. See Add Search Metadata to Questions.
  11. When your question displays and functions correctly, click Save.

    WebAssign assigns it a unique question ID (QID), which is displayed in parentheses after the question name.

    You can use your question in an assignment and see it in your My Questions list only after it is saved.

Example Numerical Question Requiring a Fraction or Decimal

The following table summarizes an actual question.

QID

1204532

Name

Template2 2.NUM.07.

Mode

Numerical

Question

<watex>\frac{1}{2} + \frac{7}{8} = </watex><_>

Answer

<EQN $FRACTION=1; fraction(11,8)>

Display to Students

Question as displayed to students

Example Numerical Question Requiring a Reduced Fraction or Integer

The following table summarizes an actual question.

QID

1203084

Name

Template2 2.NUM.08.

Mode

Numerical

Question

<p:reduce>
<div class="indent">
<watex>\frac{1}{2} <s:divide> \frac{7}{8} = </watex><_>
</div>

Answer

<EQN $PROPERFRACTION=1; fraction(4,7)>

Display to Students

Question as displayed to students

Example Fraction Question With Randomization

The following table summarizes an actual question.

QID

2703262

Name

Template2 2.NUM.07a.

Mode

Numerical

Question

<eqn>
$n1 = randnum(1,50,1);      # first numerator
$d1 = randnum(2,50,1);      # first denominator
$gcd1 = gcd($n1, $d1);      # find GCD 
$n1 = $n1 / $gcd1;          # Use GCD to reduce fraction
$d1 = $d1 / $gcd1;          # by dividing numerator & denominator

$n2 = randnum(1,50,1);      # Create second fraction the same way
$d2 = randnum(2,50,1);
$gcd2 = gcd($n2, $d2);
$n2 = $n2 / $gcd2;
$d2 = $d2 / $gcd2;

$n_key = $n1 * $d2 + $n2 * $d1;  # Numerator of answer key
$d_key = $d1 * $d2;              # Denominator of answer key
$gcd_key = gcd($n_key, $d_key);  # Reduce key with GCD
$n_key = $n_key / $gcd_key;
$d_key = $d_key / $gcd_key;

''
</eqn>

<watex>\[\frac{$n1}{$d1} + \frac{$n2}{$d2} = <_>\]</watex>

Answer

<EQN $FRACTION=1; fraction($n_key, $d_key)>

Display to Students

Question as displayed to students