Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 161 lines (140 sloc) 7.652 kb
922146a @mwahl Add exercise: Comparing improper fractions and mixed numbers. Minor m…
mwahl authored
1 <!DOCTYPE html>
5da2795 @petercollingridge Merge pull request #113389 from petercollingridge/impfrac
petercollingridge authored
2 <html data-require="math math-format graphie graphie-helpers word-problems">
cde9e9f @jeresig Re-run the exercises through the updated cleaner.
jeresig authored
3 <head>
0f0c630 @cbhl Clean up the exercise files using the new cleaning utility. (II)
cbhl authored
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4e4cb9b @beneater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
5 <title>Comparing improper fractions and mixed numbers</title>
ac1415e @spicyj Use requirejs for module loading
spicyj authored
6 <script data-main="../local-only/main.js" src="../local-only/require.js"></script>
922146a @mwahl Add exercise: Comparing improper fractions and mixed numbers. Minor m…
mwahl authored
7 </head>
8 <body>
7fab1d8 @spicyj Whitespace
spicyj authored
9
4e4cb9b @beneater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
10 <div class="exercise">
5da2795 @petercollingridge Merge pull request #113389 from petercollingridge/impfrac
petercollingridge authored
11 <div class="vars">
12 <var id="WHOLE">randRange(1, 5)</var>
13 <var id="WHOLE2">WHOLE</var>
14 <var id="DENOM1">randRangeWeighted(2, 5, 2, 0.4)</var>
15 <var id="DENOM2">randFromArray([[4, 6, 8, 10, 12], [6, 12], [8, 12], [10]][DENOM1 - 2])</var>
16 <var id="F">DENOM2 / DENOM1</var>
17
18 <var id="ORDER">randRange(0, 1)</var>
19 <var id="M_DENOM">ORDER ? DENOM1 : DENOM2</var>
20 <var id="I_DENOM">ORDER ? DENOM2 : DENOM1</var>
21
22 <var id="M_NUM">randRange(1, M_DENOM - 1)</var>
23 <var id="I_NUM2">randRange(1, I_DENOM - 1)</var>
24 <var id="I_NUM">WHOLE * I_DENOM + I_NUM2</var>
25
26 <var id="SOLUTION, COMPARISON">(function() {
c06fb9c @beneater Compare the correct number; also account for machine imprecision just…
beneater authored
27 var n1 = WHOLE2 + M_NUM / M_DENOM;
5da2795 @petercollingridge Merge pull request #113389 from petercollingridge/impfrac
petercollingridge authored
28 var n2 = I_NUM / I_DENOM;
29
c06fb9c @beneater Compare the correct number; also account for machine imprecision just…
beneater authored
30 if (n1 - n2 &gt; 1e-9) {
5da2795 @petercollingridge Merge pull request #113389 from petercollingridge/impfrac
petercollingridge authored
31 return ["&gt;", $._("is more than")];
c06fb9c @beneater Compare the correct number; also account for machine imprecision just…
beneater authored
32 } else if (abs(n1 - n2) &lt; 1e-9) {
5da2795 @petercollingridge Merge pull request #113389 from petercollingridge/impfrac
petercollingridge authored
33 return ["=", $._("is equal to")];
34 }
35 else {
36 return ["&lt;", $._("is less than")];
37 }
38 })()
39 </var>
40 </div>
41
4e4cb9b @beneater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
42 <div class="problems">
43 <div id="same-whole">
44 <div class="problem">
e25fc49 @petercollingridge Make it clear that question is about a mixed number
petercollingridge authored
45 <p>Fill in the blank to compare the mixed number and the fraction.</p>
4e4cb9b @beneater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
46 <p>
5da2795 @petercollingridge Merge pull request #113389 from petercollingridge/impfrac
petercollingridge authored
47 <code><var>WHOLE2</var>\dfrac{<var>M_NUM</var>}{<var>M_DENOM</var>}</code>
48 ____<code>\space \dfrac{<var>I_NUM</var>}{<var>I_DENOM</var>}</code>
4e4cb9b @beneater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
49 </p>
50 </div>
5da2795 @petercollingridge Merge pull request #113389 from petercollingridge/impfrac
petercollingridge authored
51
4e4cb9b @beneater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
52 <p class="solution"><code><var>SOLUTION</var></code></p>
0f0c630 @cbhl Clean up the exercise files using the new cleaning utility. (II)
cbhl authored
53 <ul class="choices" data-category="true">
4e4cb9b @beneater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
54 <li><code>&lt;</code></li>
55 <li><code>&gt;</code></li>
5ccb62f @spicyj Reorder to <, >, = for consistency with others
spicyj authored
56 <li><code>=</code></li>
4e4cb9b @beneater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
57 </ul>
5da2795 @petercollingridge Merge pull request #113389 from petercollingridge/impfrac
petercollingridge authored
58
4e4cb9b @beneater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
59 <div class="hints">
5da2795 @petercollingridge Merge pull request #113389 from petercollingridge/impfrac
petercollingridge authored
60 <div>
61 <p><code>\dfrac{<var>I_DENOM * WHOLE</var>}{<var>I_DENOM</var>} = <var>WHOLE</var></code></p>
62 <p>
2a45da4 @beneater lint
beneater authored
63 So <code>\dfrac{<var>I_NUM</var>}{<var>I_DENOM</var>}</code> is
5da2795 @petercollingridge Merge pull request #113389 from petercollingridge/impfrac
petercollingridge authored
64 <code>\dfrac{<var>I_NUM2</var>}{<var>I_DENOM</var>}</code> more than <code><var>WHOLE</var></code>
65 </p>
66 </div>
67
68 <p>
2a45da4 @beneater lint
beneater authored
69 <code><var>WHOLE2</var>\dfrac{<var>M_NUM</var>}{<var>M_DENOM</var>}</code> is
70 <code>\dfrac{<var>M_NUM</var>}{<var>M_DENOM</var>}</code> more than <code><var>WHOLE2</var></code>
5da2795 @petercollingridge Merge pull request #113389 from petercollingridge/impfrac
petercollingridge authored
71 </p>
72
73 <p>
2a45da4 @beneater lint
beneater authored
74 Which is bigger, <code>\dfrac{<var>M_NUM</var>}{<var>M_DENOM</var>}</code>
5da2795 @petercollingridge Merge pull request #113389 from petercollingridge/impfrac
petercollingridge authored
75 or <code>\dfrac{<var>I_NUM2</var>}{<var>I_DENOM</var>}</code> ?
76 </p>
77
78 <div data-if="ORDER === 1">
79 <p>
2a45da4 @beneater lint
beneater authored
80 <code>\dfrac{<var>M_NUM</var>}{<var>M_DENOM</var>}</code> is the same thing as
81 <code>\dfrac{<var>M_NUM * F</var>}{<var>M_DENOM * F</var>}</code>
5da2795 @petercollingridge Merge pull request #113389 from petercollingridge/impfrac
petercollingridge authored
82 </p>
83
4e4cb9b @beneater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
84 <div>
5da2795 @petercollingridge Merge pull request #113389 from petercollingridge/impfrac
petercollingridge authored
85 <div class="graphie">
86 init({ range: [[-0.1, 1], [0, 2.5]], scale: [400, 50] });
87 rectchart([M_NUM * F, (M_DENOM - M_NUM) * F], ["#e00", "#999"], 1.5);
88 rectchart([I_NUM2, I_DENOM - I_NUM2], ["#e00", "#999"], 0);
89 label([0, 2], "\\dfrac{" + (M_NUM * F) + "}{" + (M_DENOM * F) + "}", "left");
90 label([0, 0.5], "\\dfrac{" + I_NUM2 + "}{" + I_DENOM + "}", "left");
91 </div>
92 </div>
93 </div>
94 <div data-else="">
95 <p>
2a45da4 @beneater lint
beneater authored
96 <code>\dfrac{<var>I_NUM2</var>}{<var>I_DENOM</var>}</code> is the same thing as
97 <code>\dfrac{<var>I_NUM2 * F</var>}{<var>I_DENOM * F</var>}</code>
5da2795 @petercollingridge Merge pull request #113389 from petercollingridge/impfrac
petercollingridge authored
98 </p>
99
100 <div class="graphie">
101 init({ range: [[-0.1, 1], [0, 2.5]], scale: [400, 50] });
102 rectchart([M_NUM, M_DENOM - M_NUM], ["#e00", "#999"], 1.5);
103 rectchart([I_NUM2 * F, (I_DENOM - I_NUM2) * F], ["#e00", "#999"], 0);
104 label([0, 2], "\\dfrac{" + M_NUM + "}{" + M_DENOM + "}", "left");
105 label([0, 0.5], "\\dfrac{" + (I_NUM2 * F) + "}{" + (I_DENOM * F) + "}", "left");
4e4cb9b @beneater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
106 </div>
107 </div>
108
5da2795 @petercollingridge Merge pull request #113389 from petercollingridge/impfrac
petercollingridge authored
109 <div >
110 <p data-if="ORDER === 1">
2a45da4 @beneater lint
beneater authored
111 <code>\dfrac{<var>M_NUM * F</var>}{<var>M_DENOM * F</var>}</code> <var>COMPARISON</var>
112 <code>\dfrac{<var>I_NUM2</var>}{<var>I_DENOM</var>}</code>.
5da2795 @petercollingridge Merge pull request #113389 from petercollingridge/impfrac
petercollingridge authored
113 </p>
114 <p data-else>
2a45da4 @beneater lint
beneater authored
115 <code>\dfrac{<var>M_NUM</var>}{<var>M_DENOM</var>}</code> <var>COMPARISON</var>
116 <code>\dfrac{<var>I_NUM2 * F</var>}{<var>I_DENOM * F</var>}</code>.
5da2795 @petercollingridge Merge pull request #113389 from petercollingridge/impfrac
petercollingridge authored
117 </p>
118 <p>
2a45da4 @beneater lint
beneater authored
119 Therefore <code>\dfrac{<var>M_NUM</var>}{<var>M_DENOM</var>}</code> <var>COMPARISON</var>
120 <code>\dfrac{<var>I_NUM2</var>}{<var>I_DENOM</var>}</code>.
5da2795 @petercollingridge Merge pull request #113389 from petercollingridge/impfrac
petercollingridge authored
121 </p>
122 </div>
123
4e4cb9b @beneater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
124 <p>
5da2795 @petercollingridge Merge pull request #113389 from petercollingridge/impfrac
petercollingridge authored
125 Therefore <code><var>WHOLE2</var>\dfrac{<var>M_NUM</var>}{<var>M_DENOM</var>}
2a45da4 @beneater lint
beneater authored
126 <var>SOLUTION</var> \dfrac{<var>I_NUM</var>}{<var>I_DENOM</var>}</code>
4e4cb9b @beneater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
127 </p>
5da2795 @petercollingridge Merge pull request #113389 from petercollingridge/impfrac
petercollingridge authored
128
4e4cb9b @beneater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
129 </div>
5da2795 @petercollingridge Merge pull request #113389 from petercollingridge/impfrac
petercollingridge authored
130 </div>
131 <div id="different-whole" data-type="same-whole">
132 <div class="vars">
133 <var id="WHOLE2" data-ensure="WHOLE !== WHOLE2">randRange(1, 5)</var>
134 </div>
135
4e4cb9b @beneater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
136 <div class="hints">
5da2795 @petercollingridge Merge pull request #113389 from petercollingridge/impfrac
petercollingridge authored
137 <div>
138 <p><code>\dfrac{<var>I_DENOM * WHOLE</var>}{<var>I_DENOM</var>} = <var>WHOLE</var></code></p>
139 <p>
2a45da4 @beneater lint
beneater authored
140 So <code>\dfrac{<var>I_NUM</var>}{<var>I_DENOM</var>}</code> is
5da2795 @petercollingridge Merge pull request #113389 from petercollingridge/impfrac
petercollingridge authored
141 <code>\dfrac{<var>I_NUM2</var>}{<var>I_DENOM</var>}</code> more than <code><var>WHOLE</var></code>
142 </p>
4e4cb9b @beneater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
143 </div>
5da2795 @petercollingridge Merge pull request #113389 from petercollingridge/impfrac
petercollingridge authored
144
145 <p>
2a45da4 @beneater lint
beneater authored
146 <code><var>WHOLE2</var>\dfrac{<var>M_NUM</var>}{<var>M_DENOM</var>}</code> is
147 <code>\dfrac{<var>M_NUM</var>}{<var>M_DENOM</var>}</code> more than <code><var>WHOLE2</var></code>
5da2795 @petercollingridge Merge pull request #113389 from petercollingridge/impfrac
petercollingridge authored
148 </p>
149
150 <p>
151 Therefore <code><var>WHOLE2</var>\dfrac{<var>M_NUM</var>}{<var>M_DENOM</var>}
2a45da4 @beneater lint
beneater authored
152 <var>SOLUTION</var> \dfrac{<var>I_NUM</var>}{<var>I_DENOM</var>}</code>
5da2795 @petercollingridge Merge pull request #113389 from petercollingridge/impfrac
petercollingridge authored
153 </p>
4e4cb9b @beneater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
154 </div>
155 </div>
156 </div>
157
158 </div>
cde9e9f @jeresig Re-run the exercises through the updated cleaner.
jeresig authored
159 </body>
160 </html>
Something went wrong with that request. Please try again.