1 SECTION_LENGTH * 10 randRange(0, 100 - SECTION_LENGTH) / 10 localeToFixed(LOWER_BOUND + SECTION_LENGTH / 10, 1) 0.01 MARK_INCREMENT * 10 randRange(1, NUM_TICKS - 1) HUNDREDTHS / 10 localeToFixed(LOWER_BOUND + HUNDREDTHS * MARK_INCREMENT, 2)

Move the orange dot to \pink{SOLN_TXT} on the number line.

init({ range: [[-0.2, SECTION_LENGTH + 0.2], [-1, 1]], scale: [360 / SECTION_LENGTH, 40] }); style({arrows: ">"}); line([0, 0], [SECTION_LENGTH * 1.06, 0] ); style({arrows: "->"}); line([0, 0], [-0.06 * SECTION_LENGTH, 0]); style({arrows: ""}); for (var x = 0; x <= NUM_TICKS; x++) { if (x % 10 === 0) { line([x / 10, -0.2], [x / 10, 0.2], { stroke: BLUE, strokeWidth: 3.5 }); label([x / 10, -0.53], localeToFixed(LOWER_BOUND + x / 100, 1) , "center", { color: BLUE }); } else { line([x / 10, -0.12], [x / 10, 0.12]); } } addMouseLayer(); graph.movablePoint = addMovablePoint({ constraints: { constrainY: true }, snapX: 0.05 }); graph.movablePoint.onMove = function(x, y) { return [min(max(0, x), SECTION_LENGTH), y]; };
graph.movablePoint.coord[0]
if (guess === 0) { return ""; } return abs(SOLUTION - guess) < 0.001;
graph.movablePoint.setCoord([guess, 0]);

The length between \blue{LOWER_BOUND} and \blue{UPPER_BOUND} on the number line is \blue{LARGE_INCREMENT}, or \blue{1 \text{ decimalPlaceNames[1]}}.

This \blue{LARGE_INCREMENT} is divided into 10 equal pieces. Each piece has a length of \green{MARK_INCREMENT}, or \green{1 \text{ decimalPlaceNames[2]}}.

line([0, 0], [SOLUTION, 0], { stroke: GREEN, strokeWidth: 3.5, arrows: "->" });

From \blue{LOWER_BOUND}, we need to move \green{HUNDREDTHS \text{ plural_form(decimalPlaceNames[2], HUNDREDTHS)}} to the right to get to \pink{SOLN_TXT}.

graph.movablePoint.visibleShape.toFront(); label([HUNDREDTHS/10, -0.53], SOLN_TXT, "center", { color: PINK }); graph.movablePoint.moveTo(SOLUTION, 0);

The highlighted number shows where \pink{SOLN_TXT} is on the number line.

randRange(2, 3) floor(SOLUTION) localeToFixed(LOWER_BOUND + TENTHS * LARGE_INCREMENT, 1)

The length between the blue labeled tick marks is \blue{LARGE_INCREMENT}, or \blue{1 \text{ decimalPlaceNames[1]}}.

Each \blue{LARGE_INCREMENT} is divided into 10 equal pieces that have a length of \green{MARK_INCREMENT}, or \green{1 \text{ decimalPlaceNames[2]}}.

First, we want to move to the correct number of tenths.

We move to \blue{TENTHS_SOLN} on the number line.

style({ stroke: BLUE, fill: BLUE, strokeWidth: 3.5, arrows: "->" }); line([0, 0], [floor(SOLUTION), 0]);

Now, we want to move to the correct number of hundredths.

From \blue{TENTHS_SOLN}, we need to move \green{HUNDREDTHS % 10 \text{ plural_form(decimalPlaceNames[2], HUNDREDTHS % 10)}} to the right to get to \pink{SOLN_TXT}.

style({ stroke: GREEN, strokeWidth: 3.5, arrows: "->" }); line([floor(SOLUTION), 0], [SOLUTION, 0]);
graph.movablePoint.visibleShape.toFront(); label([HUNDREDTHS/10, -0.53], SOLN_TXT, "center", { color: PINK }); graph.movablePoint.moveTo(SOLUTION, 0);

The highlighted number shows where \pink{SOLN_TXT} is on the number line.

10 * randRange(1, SECTION_LENGTH)

The length between the blue labeled tick marks is \blue{LARGE_INCREMENT}, or \blue{1 \text{ decimalPlaceNames[1]}}.

Each \blue{LARGE_INCREMENT} is divided into 10 equal pieces that have a length of \green{MARK_INCREMENT}, or \green{1 \text{ decimalPlaceNames[2]}}.

We can rewrite the labels as \green{\text{plural_form(decimalPlaceNames[2], 2)}}.

for (var x = 0; x <= SECTION_LENGTH; x++) { label([x, 0.53], localeToFixed(LOWER_BOUND + x / 10, 2) , "center", { color: GREEN }); }
graph.movablePoint.visibleShape.toFront(); label([HUNDREDTHS / 10, 0.53], SOLN_TXT, "center", { color: PINK }); graph.movablePoint.moveTo(SOLUTION, 0);

The highlighted number shows where \pink{SOLN_TXT} is on the number line.