Permalink
Fetching contributors…
Cannot retrieve contributors at this time
41 lines (39 sloc) 1.66 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 by 2 digits</title>
<script data-main="../local-only/main.js" src="../local-only/require.js"></script>
</head>
<body>
<div class="exercise">
<div class="vars" data-ensure="QUOTIENT > 10">
<var id="DIVISOR">randRange(10, 99)</var>
<var id="PRE_DIVIDEND">rand(2) ? randRange(100, 999) : randRange(1000, 9999)</var>
<var id="QUOTIENT">floor(PRE_DIVIDEND / DIVISOR)</var>
<var id="DIVIDEND">DIVISOR * QUOTIENT</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 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-forms="integer"><var>QUOTIENT</var></div>
</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>
<p class="question"><code>\Large{<var>DIVIDEND</var> \div <var>DIVISOR</var> = <var>QUOTIENT</var>}</code></p>
</div>
</div>
</body>
</html>