This repository has been archived by the owner on May 11, 2021. It is now read-only.
/
dividing_decimals.html
41 lines (40 loc) · 1.65 KB
/
dividing_decimals.html
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
<!DOCTYPE html>
<html data-require="math graphie graphie-helpers-arithmetic">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Dividing decimals</title>
<script src="../khan-exercise.js"></script>
</head>
<body>
<div class="exercise">
<div class="vars">
<var id="DIVISOR">randRange( 10, 99 )</var>
<var id="QUOTIENT">randRange( 100, 999 )</var>
<var id="DIVIDEND">DIVISOR * QUOTIENT</var>
<var id="DIVISOR_DECIMAL">randRange( 0, 2 )</var>
<var id="MAX_DIVIDEND_DECIMAL">DIVIDEND < 10000 ? 4 : 5</var>
<var id="DIVIDEND_DECIMAL">randRange( Math.max( DIVISOR_DECIMAL, 1 ), MAX_DIVIDEND_DECIMAL)</var>
<var id="QUOTIENT_DECIMAL">DIVIDEND_DECIMAL - DIVISOR_DECIMAL</var>
<var id="DUMMY">[]</var>
</div>
<div class="problems">
<div>
<div class="graphie" id="numbers">
graph.divider = new Divider( DIVISOR, DIVIDEND, DIVISOR_DECIMAL, DIVIDEND_DECIMAL );
graph.divider.show();
DUMMY = Array( graph.divider.getNumHints() );
</div>
<div class="solution" data-type="decimal"><var>QUOTIENT / round( pow( 10, QUOTIENT_DECIMAL ) )</var></div>
</div>
</div>
<div class="hints">
<div class="graphie" data-update="numbers">
graph.divider.shiftDecimals();
</div>
<div class="graphie" data-update="numbers" data-each="DUMMY as dummy">
graph.divider.showHint();
</div>
</div>
</div>
</body>
</html>