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
/
recognizing_fractions.html
62 lines (59 loc) · 3.25 KB
/
recognizing_fractions.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
55
56
57
58
59
60
61
62
<!DOCTYPE html>
<html data-require="math graphie graphie-helpers">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Identifying numerators and denominators</title>
<script data-main="../local-only/main.js" src="../local-only/require.js"></script>
</head>
<body>
<div class="exercise">
<div class="vars">
<var id="NUMERATOR">randRange(1, 9)</var>
<var id="DENOMINATOR">randRangeExclude(3, 9, [NUMERATOR])</var>
<var id="WHOLES">ceil(NUMERATOR / DENOMINATOR)</var>
<var id="FINAL">NUMERATOR - (WHOLES - 1) * DENOMINATOR</var>
</div>
<div class="problems">
<div id="original">
<p class="question">What is the numerator of the fraction <code>\dfrac{<var>NUMERATOR</var>}{<var>DENOMINATOR</var>}</code>?</p>
<p class="solution" data-forms="integer"><var>NUMERATOR</var></p>
<div class="hints">
<p>Fractions represent parts of a whole.</p>
<div>
<p>
The fraction <code>\dfrac{<var>NUMERATOR</var>}{<var>DENOMINATOR</var>}</code>
could represent cutting pies into <code><var>DENOMINATOR</var></code> slices and
taking <code><var>NUMERATOR</var></code> of those slices.
</p>
<div class="graphie">
init({
range: [[-2, 16], [-2, 2]],
scale: 25
});
for (var i = 0; i < WHOLES; i++) {
if (i !== 0) {
piechart([DENOMINATOR, 0], [KhanUtil.BLUE, "#999"], 1.9, false, i * 4, 0);
} else {
piechart([FINAL, DENOMINATOR - FINAL], [KhanUtil.BLUE, "#999"], 1.9, false, i * 4, 0);
}
}
label([WHOLES * 4 - 2, 0], "=\\dfrac{\\blue{" + NUMERATOR + "}}{" + DENOMINATOR + "}"
+ "=\\dfrac{\\blue{\\text{" + i18n._("numerator") + "}}}{\\text{" + i18n._("denominator") + "}}", "right");
</div>
</div>
<p id="answer_hint_1">The numerator is the number of slices we take, and it is written above the fraction line.</p>
<p id="answer_hint_2">So the numerator is <code><var>NUMERATOR</var></code>.</p>
</div>
</div>
<div data-type="original">
<p class="question">What is the denominator of the fraction <code>\dfrac{<var>NUMERATOR</var>}{<var>DENOMINATOR</var>}</code>?</p>
<p class="solution" data-forms="integer"><var>DENOMINATOR</var></p>
<div class="hints" data-apply="appendContents">
<p id="answer_hint_1">The denominator is the number of slices per pie, and it is written below the line.</p>
<p id="answer_hint_2">So the denominator is <code><var>DENOMINATOR</var></code>.</p>
</div>
</div>
</div>
</div>
</body>
</html>