This repository has been archived by the owner on May 11, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 863
/
multiplying_decimals.html
45 lines (44 loc) · 2.05 KB
/
multiplying_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
42
43
44
45
<!DOCTYPE html>
<html data-require="math math-format graphie graphie-helpers-arithmetic word-problems">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Multiplying decimals</title>
<script src="../khan-exercise.js"></script>
</head>
<body>
<div class="exercise">
<div class="vars">
<var id="SMALL_FACTOR">randRange( 100, 999 )</var>
<var id="BIG_FACTOR">randRange( 100, 999 )</var>
<var id="PRODUCT">SMALL_FACTOR * BIG_FACTOR</var>
<div data-ensure="BIG_FACTOR_DECIMAL > 0 || SMALL_FACTOR_DECIMAL > 0">
<var id="BIG_FACTOR_DECIMAL">randRange( 0, 3 )</var>
<var id="SMALL_FACTOR_DECIMAL">randRange( 0, 3 )</var>
</div>
<var id="SMALL_FACTOR_DIGITS">padDigitsToNum( digits( SMALL_FACTOR ), SMALL_FACTOR_DECIMAL + 1 )</var>
<var id="BIG_FACTOR_DIGITS">padDigitsToNum( digits( BIG_FACTOR ), BIG_FACTOR_DECIMAL + 1 )</var>
<var id="DUMMY">[]</var>
</div>
<div class="problems">
<div>
<br>
<div class="graphie" id="numbers">
graph.multiplier = new Multiplier( BIG_FACTOR, SMALL_FACTOR, BIG_FACTOR_DIGITS, SMALL_FACTOR_DIGITS, BIG_FACTOR_DECIMAL, SMALL_FACTOR_DECIMAL );
graph.multiplier.show();
graph.multiplier.showDecimals();
DUMMY = Array( graph.multiplier.getNumHints() );
</div>
<div class="solution" data-type="decimal"><var>( PRODUCT * pow( 10, -(BIG_FACTOR_DECIMAL + SMALL_FACTOR_DECIMAL) ) ).toFixed(BIG_FACTOR_DECIMAL + SMALL_FACTOR_DECIMAL)</var></div>
</div>
</div>
<div class="hints">
<div class="graphie" data-update="numbers" data-each="DUMMY as dummy">
graph.multiplier.showHint();
</div>
<div class="graphie" data-update="numbers">
graph.multiplier.showDecimalsInProduct();
</div>
</div>
</div>
</body>
</html>