Permalink
Fetching contributors…
Cannot retrieve contributors at this time
53 lines (48 sloc) 2.21 KB
<!DOCTYPE html>
<html data-require="math graphie graphie-helpers-arithmetic">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Division with remainders</title>
<script data-main="../local-only/main.js" src="../local-only/require.js"></script>
</head>
<body>
<div class="exercise">
<div class="vars">
<var id="DIVISOR">randRange(2, 9)</var>
<var id="PRE_DIVIDEND">rand(2) ? randRange(100, 999) : randRange(1000, 9999)</var>
<var id="QUOTIENT">floor(PRE_DIVIDEND / DIVISOR)</var>
<var id="REMAINDER">randRange(1, DIVISOR - 1)</var>
<var id="DIVIDEND">DIVISOR * QUOTIENT + REMAINDER</var>
<var id="DUMMY">[]</var>
</div>
<div class="problems">
<div>
<p class="question"><code>\Large{<var>DIVIDEND</var> \div <var>DIVISOR</var> = ?}</code></p>
<p><em>Write your answer as a whole number and remainder.</em></p>
<p class="render-answer-area-here"></p>
<div class="graphie" id="numbers">
graph.divider = new Divider(DIVISOR, DIVIDEND);
DUMMY = Array(graph.divider.getNumHints());
</div>
<div class="solution" data-type="multiple">
<div>
<span class="sol short40" data-forms="integer"><var>QUOTIENT</var></span><code>\text{ R }</code>
<span class="sol short40" data-forms="integer" data-fallback="0"><var>REMAINDER</var></span>
</div>
</div>
<div class="hints">
<div class="graphie" data-update="numbers">
graph.divider.show();
</div>
<div class="graphie" data-each="DUMMY as dummy" data-update="numbers">
graph.divider.showHint();
</div>
<div><code>
\Large{<var>DIVIDEND</var> \div <var>DIVISOR</var> = <var>QUOTIENT</var> \text{ R } <var>REMAINDER</var>}
</code></div>
</div>
</div>
</div>
</div>
</body>
</html>