Skip to content
This repository
Fetching contributors…

Cannot retrieve contributors at this time

file 64 lines (62 sloc) 1.799 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
<!DOCTYPE html>
<html data-require="math graphie graphie-helpers-arithmetic">
<head>
<meta charset="UTF-8" />
<title>Division 0.5</title>
<script src="../khan-exercise.js"></script>
</head>
<body>
<div class="exercise">
<div class="vars">
<var id="A">randRange( 1, 10 )</var>
<var id="B">randFromArray( [ 1, 2, 3, 5, 10 ] )</var>
<var id="C">A * B</var>
</div>

<div class="problems">
<div>
<div class="graphie" id="numbers">
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}{ <var>C</var> } \\div \\color{#FFA500}{ <var>B</var> } = {?}}", "right" );
</div>
<div class="solution" data-forms="integer"><var>A</var></div>
</div>
</div>
<div class="hints">
<div data-if="B > 1" data-unwrap>
<div>
<div class="graphie" data-update="numbers">
for ( var i = 0; i &lt; A; i++ ) {
drawRow( B, A - 1 - i, "#6495ED", B * i + 1 );
}
</div>
<p>Draw <var>C</var> circles, with <var>B</var> to each row.</p>
</div>
<div>
<div class="graphie" data-update="numbers">
style({
stroke: "#FFA500"
});
for ( var i = 1; i &lt; A; i++ ) {
path ( [ [ - 0.5 , i - 0.5 ], [ B - 0.5 , i - 0.5 ] ]);
}
</div>
<p>How many rows are there?</p>
</div>
</div>
<p data-else>
Dividing any number by 1 equals itself.
</p>
<div class="graphie" data-update="numbers">
KhanUtil.currentGraph.labelHolder.remove();
label( [ 0, A ],
"\\Huge{\\color{#6495ED}{" + C + "} \\div \\color{#FFA500}{" + B + "} = " + A + "}", "right" );
</div>
</div>
</div>
</body>
</html>
Something went wrong with that request. Please try again.