randRange(1, 19) randRange(1, 20 - A) A + B randRange(0, 2)

Fill in the blank to make the equation true.

// Focus the first input $('.problem-equation input').eq(0).focus() Khan.scratchpad.disable();
A + B = C
+ A = C
B + = C
B + A =
Fill in the blank with the correct number.
$("div.problem input").val()
var validator = Khan.answerTypes.number.createValidatorFunctional([B, A, C][MISSING], {}); var result = validator(guess); if (result.empty) { return result.message || ""; } return result.message || result.correct;
$("div.problem input").val(guess);

If we have \blue{A} blue dot \blue{A} blue dots and \green{B} green dot \green{B} green dots, then we have a total of C dots.

var numCols = floor(sqrt(max(A, B))); var numRows1 = floor(A / numCols); var numRows2 = floor(B / numCols); var top = max(numRows1, numRows2); init({ range: [[0, numCols * 2 + 3], [-1, top + 1]], scale: [30, 30] }); // Distance between start of each set of dots in pixels graph.translation = (numCols + 1) * 30; function drawDots(n, dx) { var set = raphael.set(); var x = 0; var y = top; for (var i = 0; i < n; i++) { set.push(circle([x + dx, y], 0.25)); x++; if (x >= numCols) { x = 0; y--; } } return set; } style({ stroke: BLUE, fill: BLUE }); graph.dotsA = drawDots(A, 1); style({ stroke: GREEN, fill: GREEN }); graph.dotsB = drawDots(B, numCols + 2);

If we swap the order of the dots, the number of dots doesn't change.

graph.dotsA.animate({ translation: graph.translation }, 500); graph.dotsB.animate({ translation: -1 * graph.translation }, 500);

So, \green{B} + \blue{A} = C.

Fill in the blank to make the equation true.

// Focus the first input $('.problem-equation input').eq(0).focus() Khan.scratchpad.disable();
C - B = A
- A = B
C - = B
C - A =
Fill in the blank with the correct number.
$("div.problem input").val()
var validator = Khan.answerTypes.number.createValidatorFunctional([C, A, B][MISSING], {}); var result = validator(guess); if (result.empty) { return result.message || ""; } return result.message || result.correct;
$("div.problem input").val(guess);

If we have \blue{C} blue dots and remove \red{B} of them, then we have A dot A dots left.

drawCircles(C, BLUE); crossOutCircles(C, B, RED);

If we have \blue{C} blue dots and remove \red{A} of them, then we have B dot B dots left.

drawCircles(C, BLUE); var numCols = floor(sqrt(C)); var numRows = floor(C / numCols); var extra = C % numRows; var count = 0; style({ stroke: RED, fill: RED }); for (var i = numRows; i > 0; i--) { for (var j = numCols; j > 0; j--) { if (count >= B) { path([[j - 0.3, i - 0.3], [j + 0.3, i + 0.3]]); path([[j - 0.3, i + 0.3], [j + 0.3, i - 0.3]]); } count++; } } for (var j = extra; j > 0; j--) { if (count >= B) { path([[j - 0.3, i - 0.3], [j + 0.3, i + 0.3]]); path([[j - 0.3, i + 0.3], [j + 0.3, i - 0.3]]); } count++; }

So, \blue{C} - \red{A} = B.