randRange( 1, 10 ) randFromArray( [ 1, 2, 3, 5, 10 ] ) A * B
var bottomBoundary = ( B === 1 ) ? A - 1 : -1; init({ range: [ [ -1, 10 ], [ bottomBoundary, A + 1 ] ], scale: [ 50, 50 ] }); KhanUtil.currentGraph.labelHolder = label( [ 0, A ], "\\Huge{\\color{#6495ED}{" + C + "} \\div \\color{#FFA500}{" + B + "} = {?}}", "right" );
A
for ( var i = 0; i < A; i++ ) { drawRow( B, A - 1 - i, "#6495ED", B * i + 1 ); }

Draw C circles, with B to each row.

style({ stroke: "#FFA500" }); for ( var i = 1; i < A; i++ ) { path ( [ [ - 0.5 , i - 0.5 ], [ B - 0.5 , i - 0.5 ] ]); }

How many rows are there?

Dividing any number by 1 equals itself.

KhanUtil.currentGraph.labelHolder.remove(); label( [ 0, A ], "\\Huge{\\color{#6495ED}{" + C + "} \\div \\color{#FFA500}{" + B + "} = " + A + "}", "right" );