# Khan/khan-exercises

Switch branches/tags
Nothing to show
Fetching contributors…
Cannot retrieve contributors at this time
62 lines (60 sloc) 1.88 KB
 Multiplication 1
randRange( 1, 10 ) randRange( 0, 10 )
init({ range: [ [ -1, 12], [ -3, B + 1 ] ], scale: [ 50, 50 ] }); KhanUtil.currentGraph.labelHolder = label( [ 0, B ], "\\Huge{\\color{#6495ED}{ A } \\times \\color{#28AE7B}{ B } = {?}}", "right" );
A * B
label( [ 0, B - 1 ], "\\text{Draw " + plural( A, "circle" ) + ".}", "right" ); drawRow( A, B - 3, "#6495ED", 1 );
label( [ 0, B - 2 ], "\\text{" + "If there" + ( B === 1 ? " is " : " are " ) + plural( B, "row" ) + " with " + plural( A, "circle" ) + ( B === 1 ? " " : " each " ) + ", there is a total of how many circles?" + "}", "right" ); for ( var i = 1; i < B; i++ ) { drawRow( A, B - 3 - i, "#28AE7B", A * i + 1 ); }
label( [ 0, B - 1 ], "\\large{\\text{Multiplying any number by 0 equals 0.}}", "right" );
KhanUtil.currentGraph.labelHolder.remove(); label( [ 0, B ], "\\Huge{\\color{#6495ED}{" + A + "} \\times \\color{#28AE7B}{" + B + "} = " + ( A * B ) + "}", "right" );