Permalink
Fetching contributors…
Cannot retrieve contributors at this time
61 lines (58 sloc) 2.15 KB
<!DOCTYPE html>
<html data-require="math graphie graphie-helpers-arithmetic">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Basic division</title>
<script data-main="../local-only/main.js" src="../local-only/require.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="question">
<code>\Huge\blue{<var>C</var>}\div\green{<var>B</var>}=\pink{{?}}</code>
</div>
<div class="solution" data-forms="integer"><var>A</var></div>
</div>
</div>
<div class="hints">
<div data-if="B > 1" data-unwrap="">
<div>
<p>Draw <var>C</var> circles, with <var>B</var> to each row.</p>
<div class="graphie" id="numbers">
init({
range: [ [ -1, B ], [ -1, A ] ],
scale: [ 50, 50 ]
});
for ( var i = 0; i &lt; A; i++ ) {
drawRow( B, A - 1 - i, "#6495ED", B * i + 1 );
}
</div>
</div>
<div>
<div class="graphie" data-update="numbers">
style({
stroke: GREEN
});
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>
<code>\Huge\blue{<var>C</var>}\div\green{<var>B</var>}=\pink{<var>A</var>}</code>
</div>
</div>
</div>
</body>
</html>