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
/
multiplication_2.html
54 lines (53 loc) · 2.33 KB
/
multiplication_2.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
46
47
48
49
50
51
52
53
54
<!DOCTYPE html>
<html data-require="math graphie graphie-helpers graphie-helpers-arithmetic">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Multiplication with regrouping</title>
<script data-main="../local-only/main.js" src="../local-only/require.js"></script>
</head>
<body>
<div class="exercise">
<div class="vars">
<var id="ORDER">rand(2)</var>
<var id="SMALL_FACTOR">randRange(2, 9)</var>
<var id="BIG_FACTOR">randFromArray([randRange(100, 999), randRange(1000, 9999)])</var>
<var id="DUMMY">[]</var>
</div>
<div class="problems">
<div>
<p class="problem">
<span data-if="ORDER === 0">
<code>\large{<var>SMALL_FACTOR</var> \times <var>BIG_FACTOR</var> = {?}}</code>
</span><span data-else="">
<code>\large{<var>BIG_FACTOR</var> \times <var>SMALL_FACTOR</var> = {?}}</code>
</span>
</p>
<div class="render-answer-area-here"></div>
<div class="graphie" id="numbers">
graph.multiplier = new Multiplier(BIG_FACTOR, SMALL_FACTOR);
DUMMY = Array(graph.multiplier.getNumHints() - 1);
</div>
<div class="solution" data-forms="integer"><var>SMALL_FACTOR * BIG_FACTOR</var></div>
</div>
</div>
<div class="hints">
<div class="graphie" data-update="numbers">
graph.multiplier.show();
</div>
<div class="graphie" data-each="DUMMY as dummy" data-update="numbers">
graph.multiplier.showHint();
</div>
<div>
<div class="graphie" data-each="DUMMY as dummy" data-update="numbers">
graph.multiplier.showHint();
</div>
<p data-if="ORDER === 0">
<code>\large{<var>SMALL_FACTOR</var> \times <var>BIG_FACTOR</var> = <var>SMALL_FACTOR * BIG_FACTOR</var>}</code>
</p><p data-else="">
<code>\large{<var>BIG_FACTOR</var> \times <var>SMALL_FACTOR</var> = <var>SMALL_FACTOR * BIG_FACTOR</var>}</code>
</p>
</div>
</div>
</div>
</body>
</html>