3 randFromArray([3, 4, 6, 8]) randRangeUnique(1, DENOMINATOR, NUM_ITEMS) NUMERATORS.slice().sort() NUMS_SORTED.join(",") $.map(NUMS_SORTED, function(el) { return "\\dfrac{" + el + "}{" + DENOMINATOR + "}"; }).join(",") createSorter()

Order the following fractions from least to greatest:

- N `\dfrac{N}{DENOMINATOR}`

SORTER.init("sortable")

Drag the fractions left and right so they are in order from least to greatest
SORTER.getContent()
if (SORTER.hasAttempted) { return guess.join(",") === SORTED_LIST; } else { return ""; }
SORTER.setContent(guess);

We can draw a picture to compare the fractions.

init({ range: [[-0.1, 1], [0, NUM_ITEMS * 2]], scale: [400, 25] }); for (var i = 0; i < NUM_ITEMS; i++) { var y = (NUM_ITEMS - i - 1) * 2; rectchart([NUMERATORS[i], DENOMINATOR - NUMERATORS[i]], [RED, GRAY], y); label([-0.05, y + 0.5], "\\dfrac{" + NUMERATORS[i] + "}{" + DENOMINATOR + "}"); }

The order from least to greatest is: `ANSWER`.

randFromArray([3, 4, 6, 8]) randRange(1, DENOMINATOR) randRangeExclude(1, DENOMINATOR, [NUMERATOR_1]) NUMERATOR_1 < NUMERATOR_2 ? "<" : ">"

Compare.

`\dfrac{NUMERATOR_1}{DENOMINATOR}` ____ `\dfrac{NUMERATOR_2}{DENOMINATOR}`

`SOLUTION`

- `<`
- `>`
- `=`

`\large{<}` means "less than".
`\large{>}` means "greater than".
`\large{=}` means "equal to".

We can draw a picture to compare the fractions.

init({ range: [[-0.1, 1], [0, 5.5]], scale: [425, 25] }); rectchart([NUMERATOR_1, DENOMINATOR - NUMERATOR_1], [RED, GRAY], 3); rectchart([NUMERATOR_2, DENOMINATOR - NUMERATOR_2], [RED, GRAY], 1); label([-0.05, 3.5], "\\dfrac{" + NUMERATOR_1 + "}{" + DENOMINATOR + "}"); label([-0.05, 1.5], "\\dfrac{" + NUMERATOR_2 + "}{" + DENOMINATOR + "}");

`\dfrac{NUMERATOR_1}{DENOMINATOR} SOLUTION \dfrac{NUMERATOR_2}{DENOMINATOR}`

randFromArray([2, 3, 4, 6, 8]) randRange(1, 10) randRangeExclude(1, 10, [NUMERATOR_1]) ceil(max(NUMERATOR_1, NUMERATOR_2) / DENOMINATOR) randFromArray(["A", "B"])

Which number line correctly shows `\dfrac{NUMERATOR_1}{DENOMINATOR}` and `\dfrac{NUMERATOR_2}{DENOMINATOR}`?

init({ range: [[-0.15, 1.1], [0, 7]], scale: [400, 25] }); var tick = 0.25; var labels = [ 0, "\\dfrac{" + NUMERATOR_1 + "}{" + DENOMINATOR + "}", "\\dfrac{" + NUMERATOR_2 + "}{" + DENOMINATOR + "}" ]; var drawNumberLine = function(y, name, numbers) { // Seems this only adds an arrow to one end line([-0.05, y], [1.05, y], { arrows: "<->" }); line([1.05, y], [-0.05, y], { arrows: "<->" }); label([-0.1, y], name); for (var i = 0; i < numbers.length; i++) { var x = numbers[i] / DENOMINATOR / MAX_NUM; line([x, y - tick], [x, y + tick]); label([x, y - 0.2], labels[i], "below"); } }; if (SOLUTION === "A") { drawNumberLine(6, "A", [0, NUMERATOR_1, NUMERATOR_2]); drawNumberLine(2, "B", [0, NUMERATOR_2, NUMERATOR_1]); } else { drawNumberLine(6, "A", [0, NUMERATOR_2, NUMERATOR_1]); drawNumberLine(2, "B", [0, NUMERATOR_1, NUMERATOR_2]); }
Number line `SOLUTION`

- Number line `A`
- Number line `B`

We can draw a picture of a number line showing `1` divided into `DENOMINATOR` equal pieces of `\dfrac{1}{DENOMINATOR}` to compare the fractions.

init({ range: [[-0.1, 1.1], [0, 3]], scale: [400, 25] }); var y = 2; line([-0.05, y], [1.05, y], { arrows: "<->" }); line([1.05, y], [-0.05, y], { arrows: "<->" }); var tick = 0.25 for (var i = 0; i <= MAX_NUM * DENOMINATOR; i++) { var x = i / DENOMINATOR / MAX_NUM; line([x, y - tick], [x, y + tick]); if (i % DENOMINATOR === 0) { label([x, y], roundTo(1, i / DENOMINATOR), "above"); } }

Count `\blue{NUMERATOR_1}` tick along to locate `\blue{\dfrac{NUMERATOR_1}{DENOMINATOR}}` on the number line.

Count `\blue{NUMERATOR_1}` ticks along to locate `\blue{\dfrac{NUMERATOR_1}{DENOMINATOR}}` on the number line.

Count `\red{NUMERATOR_2}` tick along to locate `\red{\dfrac{NUMERATOR_2}{DENOMINATOR}}` on the number line.

Count `\red{NUMERATOR_2}` ticks along to locate `\red{\dfrac{NUMERATOR_2}{DENOMINATOR}}` on the number line.

label( [NUMERATOR_1 / DENOMINATOR / MAX_NUM, 1.8], "\\blue{\\dfrac{" + NUMERATOR_1 + "}{" + DENOMINATOR + "}}", "below" ); label( [NUMERATOR_2 / DENOMINATOR / MAX_NUM, 1.8], "\\red{\\dfrac{" + NUMERATOR_2 + "}{" + DENOMINATOR + "}}", "below" );

So number line `SOLUTION` is correct.