Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 181 lines (160 sloc) 9.205 kb
bbc88c3 @pkuperman Add Exercise--Adding & Subtracting Mixed Numbers 1
pkuperman authored
1 <!DOCTYPE html>
cde9e9f @jeresig Re-run the exercises through the updated cleaner.
jeresig authored
2 <html data-require="math math-format">
3 <head>
bc61129 @spicyj Update title tags
spicyj authored
4 <title>Adding and subtracting mixed numbers 1</title>
ac1415e @spicyj Use requirejs for module loading
spicyj authored
5 <script data-main="../local-only/main.js" src="../local-only/require.js"></script>
bbc88c3 @pkuperman Add Exercise--Adding & Subtracting Mixed Numbers 1
pkuperman authored
6 </head>
7
8 <body>
9 <div class="exercise">
4e4cb9b @beneater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
10 <div class="problems">
11 <div id="two-numbers">
12 <div class="vars">
bfbfd36 @petercollingridge Add some explanation to the hints
petercollingridge authored
13 <var id="PM">randRangeNonZero(-1, 1)</var>
14 <var id="SIGN">PM === 1 ? "+" : "-"</var>
15 <var id="W1">randRange(2, 19)</var>
16 <var id="W2">PM === 1 ? randRange(1, 19) : randRange(-W1 + 1, -1)</var>
17
18 <div data-ensure="getLCM(D1, D2) &lt; 61">
19 <var id="D1">randRange(3, 20)</var>
20 <var id="D2">randRangeExclude(3, 20, [D1])</var>
4e4cb9b @beneater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
21 </div>
e9807ff @jeresig Clean up the exercise files using the new cleaning utility.
jeresig authored
22 <div data-ensure="( PM === 1 ? (N1 / D1) + (N2 / D2) &lt; 1 : (N1 / D1) + PM * (N2 / D2) &gt; 0)">
bfbfd36 @petercollingridge Add some explanation to the hints
petercollingridge authored
23 <var id="N1">randRange(1, D1 - 1)</var>
24 <var id="N2">randRange(1, D2 - 1)</var>
4e4cb9b @beneater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
25 </div>
bbc88c3 @pkuperman Add Exercise--Adding & Subtracting Mixed Numbers 1
pkuperman authored
26
bfbfd36 @petercollingridge Add some explanation to the hints
petercollingridge authored
27 <var id="GCD1">getGCD(N1, D1)</var>
4e4cb9b @beneater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
28 <var id="SIMP_N1">N1 / GCD1</var>
29 <var id="SIMP_D1">D1 / GCD1</var>
bbc88c3 @pkuperman Add Exercise--Adding & Subtracting Mixed Numbers 1
pkuperman authored
30
bfbfd36 @petercollingridge Add some explanation to the hints
petercollingridge authored
31 <var id="GCD2">getGCD(N2, D2)</var>
4e4cb9b @beneater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
32 <var id="SIMP_N2">N2 / GCD2</var>
33 <var id="SIMP_D2">D2 / GCD2</var>
bbc88c3 @pkuperman Add Exercise--Adding & Subtracting Mixed Numbers 1
pkuperman authored
34
bfbfd36 @petercollingridge Add some explanation to the hints
petercollingridge authored
35 <var id="LCM">getLCM(SIMP_D1, SIMP_D2)</var>
36 <var id="GCD">getGCD(SIMP_N1 * LCM / SIMP_D1 + PM * SIMP_N2 * LCM / SIMP_D2 , LCM)</var>
4e4cb9b @beneater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
37 </div>
bbc88c3 @pkuperman Add Exercise--Adding & Subtracting Mixed Numbers 1
pkuperman authored
38
45ca205 @petercollingridge Remove words from hint
petercollingridge authored
39 <p class="problem">Express your answer as a <em>mixed number simplified to lowest terms</em>.</p>
bfbfd36 @petercollingridge Add some explanation to the hints
petercollingridge authored
40 <p class="question"><code>
41 <var>W1</var><var>fraction(N1, D1)</var> <var>SIGN</var> <var>abs(W2)</var><var>fraction(N2, D2)</var> = {?}
42 </code></p>
0f0c630 @cbhl Clean up the exercise files using the new cleaning utility. (II)
cbhl authored
43 <div class="solution" data-type="mixed"><var>W1 + W2 + N1 / D1 + PM * N2 / D2</var></div>
bbc88c3 @pkuperman Add Exercise--Adding & Subtracting Mixed Numbers 1
pkuperman authored
44
4e4cb9b @beneater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
45 <div class="hints">
bfbfd36 @petercollingridge Add some explanation to the hints
petercollingridge authored
46 <div data-if="GCD1 !== 1 || GCD2 !== 1">
47 <p><code>\qquad =
48 \blue{<var>W1</var><var>fraction(SIMP_N1, SIMP_D1)</var>} <var>SIGN</var>
49 \pink{<var>abs(W2)</var><var>fraction(SIMP_N2, SIMP_D2)</var>}
50 </code></p>
51 </div>
c823ad0 @petercollingridge Simplify hints
petercollingridge authored
52
bfbfd36 @petercollingridge Add some explanation to the hints
petercollingridge authored
53 <p data-if="SIGN === '-'"><code>\qquad =
54 \blue{<var>W1</var>} + \blue{<var>fraction(SIMP_N1, SIMP_D1)</var>} <var>SIGN</var>
55 \left(\pink{<var>abs(W2)</var>} + \pink{<var>fraction(SIMP_N2, SIMP_D2)</var>}\right)
c823ad0 @petercollingridge Simplify hints
petercollingridge authored
56 </code></p>
57
bfbfd36 @petercollingridge Add some explanation to the hints
petercollingridge authored
58 <p><code>\qquad =
59 \blue{<var>W1</var>} + \blue{<var>fraction(SIMP_N1, SIMP_D1)</var>} <var>SIGN</var>
60 \pink{<var>abs(W2)</var>} <var>SIGN</var> \pink{<var>fraction(SIMP_N2, SIMP_D2)</var>}
c823ad0 @petercollingridge Simplify hints
petercollingridge authored
61 </code></p>
62
bfbfd36 @petercollingridge Add some explanation to the hints
petercollingridge authored
63 <div>
64 <p><code>\qquad =
65 \blue{<var>W1</var>} <var>SIGN</var> \pink{<var>abs(W2)</var>} +
66 \blue{<var>fraction(SIMP_N1, SIMP_D1)</var>} <var>SIGN</var>
67 \pink{<var>fraction(SIMP_N2, SIMP_D2)</var>}
68 </code></p>
69 <p><code>\qquad =
70 <var>W1 + W2</var> + \blue{<var>fraction(SIMP_N1, SIMP_D1)</var>} <var>SIGN</var>
71 \pink{<var>fraction(SIMP_N2, SIMP_D2)</var>}
72 </code></p>
73 </div>
c823ad0 @petercollingridge Simplify hints
petercollingridge authored
74
bfbfd36 @petercollingridge Add some explanation to the hints
petercollingridge authored
75 <div data-if="LCM !== 1">
76 <p><code>\qquad =
77 <var>W1 + W2</var> + \blue{<var>fraction(SIMP_N1 * LCM / SIMP_D1, LCM)</var>} <var>SIGN</var>
78 \pink{<var>fraction(SIMP_N2 * LCM / SIMP_D2, LCM)</var>}
79 </code></p>
80 </div>
c823ad0 @petercollingridge Simplify hints
petercollingridge authored
81
bfbfd36 @petercollingridge Add some explanation to the hints
petercollingridge authored
82 <div>
83 <p><code>\qquad = <var>W1 + W2</var> + <var>fraction(SIMP_N1 * LCM / SIMP_D1 + PM * SIMP_N2 * LCM / SIMP_D2, LCM)</var></code></p>
84 <p><code>\qquad = <var>W1 + W2 + fraction(SIMP_N1 * LCM / SIMP_D1 + PM * SIMP_N2 * LCM / SIMP_D2, LCM)</var></code></p>
85 <p data-if="GCD > 1"><code>\qquad =
86 <var>W1 + W2 + fractionReduce(SIMP_N1 * LCM / SIMP_D1 + PM * SIMP_N2 * LCM / SIMP_D2, LCM)</var>
87 </code></p>
88 </div>
4e4cb9b @beneater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
89 </div>
90 </div>
9212f6f @beneater Add problem types to adding_and_subtracting_mixed_numbers_*
beneater authored
91
92 <div id="two-numbers-w-borrowing">
93 <div class="vars">
94 <var id="PM">-1</var>
95 <var id="SIGN">"-"</var>
bfbfd36 @petercollingridge Add some explanation to the hints
petercollingridge authored
96 <var id="W1">randRange(2, 19)</var>
97 <var id="W2">randRange(-W1 + 1, -1)</var>
98 <div data-ensure="getLCM( D1, D2 ) &lt; 61">
99 <var id="D1">randRange(3, 20)</var>
100 <var id="D2">randRangeExclude(3, 20, [D1])</var>
9212f6f @beneater Add problem types to adding_and_subtracting_mixed_numbers_*
beneater authored
101 </div>
e9807ff @jeresig Clean up the exercise files using the new cleaning utility.
jeresig authored
102 <div data-ensure="(N1 / D1) &lt; (N2 / D2)">
bfbfd36 @petercollingridge Add some explanation to the hints
petercollingridge authored
103 <var id="N1">randRange(1, D1 - 1)</var>
104 <var id="N2">randRange(1, D2 - 1)</var>
9212f6f @beneater Add problem types to adding_and_subtracting_mixed_numbers_*
beneater authored
105 </div>
bfbfd36 @petercollingridge Add some explanation to the hints
petercollingridge authored
106 <var id="GCD1">getGCD(N1, D1)</var>
9212f6f @beneater Add problem types to adding_and_subtracting_mixed_numbers_*
beneater authored
107 <var id="SIMP_N1">N1 / GCD1</var>
108 <var id="SIMP_D1">D1 / GCD1</var>
bfbfd36 @petercollingridge Add some explanation to the hints
petercollingridge authored
109 <var id="GCD2">getGCD(N2, D2)</var>
9212f6f @beneater Add problem types to adding_and_subtracting_mixed_numbers_*
beneater authored
110 <var id="SIMP_N2">N2 / GCD2</var>
111 <var id="SIMP_D2">D2 / GCD2</var>
bfbfd36 @petercollingridge Add some explanation to the hints
petercollingridge authored
112 <var id="LCM">getLCM(SIMP_D1, SIMP_D2)</var>
113 <var id="GCD">getGCD(SIMP_N1 * LCM / SIMP_D1 + PM * SIMP_N2 * LCM / SIMP_D2 , LCM)</var>
9212f6f @beneater Add problem types to adding_and_subtracting_mixed_numbers_*
beneater authored
114 </div>
45ca205 @petercollingridge Remove words from hint
petercollingridge authored
115 <p class="problem">Express your answer as a <em>mixed number simplified to lowest terms</em>.</p>
bfbfd36 @petercollingridge Add some explanation to the hints
petercollingridge authored
116 <p class="question"><code><var>W1 + 1</var><var>fraction(N1, D1)</var> + <var>W2</var><var>fraction(N2, D2)</var> = {?}</code></p>
0f0c630 @cbhl Clean up the exercise files using the new cleaning utility. (II)
cbhl authored
117 <div class="solution" data-type="mixed"><var>W1 + 1 + W2 + N1 / D1 + PM * N2 / D2</var></div>
9212f6f @beneater Add problem types to adding_and_subtracting_mixed_numbers_*
beneater authored
118 <div class="hints">
bfbfd36 @petercollingridge Add some explanation to the hints
petercollingridge authored
119 <div data-if="GCD1 !== 1 || GCD2 !== 1">
120 <p><code>\qquad =
121 \blue{<var>W1 + 1</var><var>fraction(SIMP_N1, SIMP_D1)</var>} <var>SIGN</var>
122 \pink{<var>abs(W2)</var><var>fraction(SIMP_N2, SIMP_D2)</var>}
123 </code></p>
124 </div>
c823ad0 @petercollingridge Simplify hints
petercollingridge authored
125
bfbfd36 @petercollingridge Add some explanation to the hints
petercollingridge authored
126 <div data-if="LCM !== 1">
127 <p><code>\qquad =
128 \blue{<var>W1 + 1</var><var>fraction(SIMP_N1 * LCM / SIMP_D1, LCM)</var>} <var>SIGN</var>
129 \pink{<var>abs(W2)</var><var>fraction(SIMP_N2 * LCM / SIMP_D2, LCM)</var>}
130 </code></p>
131 </div>
c823ad0 @petercollingridge Simplify hints
petercollingridge authored
132
bfbfd36 @petercollingridge Add some explanation to the hints
petercollingridge authored
133 <p><code>\qquad =
c823ad0 @petercollingridge Simplify hints
petercollingridge authored
134 \blue{<var>W1</var> + <var>fraction(LCM, LCM)</var> + <var>fraction(SIMP_N1 * LCM / SIMP_D1, LCM)</var>} <var>SIGN</var>
135 \pink{<var>abs(W2)</var><var>fraction(SIMP_N2 * LCM / SIMP_D2, LCM)</var>}
136 </code></p>
137
bfbfd36 @petercollingridge Add some explanation to the hints
petercollingridge authored
138 <p><code>\qquad =
c823ad0 @petercollingridge Simplify hints
petercollingridge authored
139 \blue{<var>W1</var><var>fraction(LCM + SIMP_N1 * LCM / SIMP_D1, LCM)</var>} <var>SIGN</var>
140 \pink{<var>abs(W2)</var><var>fraction(SIMP_N2 * LCM / SIMP_D2, LCM)</var>}
141 </code></p>
142
bfbfd36 @petercollingridge Add some explanation to the hints
petercollingridge authored
143 <p><code>\qquad =
c823ad0 @petercollingridge Simplify hints
petercollingridge authored
144 \blue{<var>W1</var>} + \blue{<var>fraction(LCM + SIMP_N1 * LCM / SIMP_D1, LCM)</var>} <var>SIGN</var>
145 \left(\pink{<var>abs(W2)</var>} + \pink{<var>fraction(SIMP_N2 * LCM / SIMP_D2, LCM)</var>}\right)
146 </code></p>
147
bfbfd36 @petercollingridge Add some explanation to the hints
petercollingridge authored
148 <p><code>\qquad =
c823ad0 @petercollingridge Simplify hints
petercollingridge authored
149 \blue{<var>W1</var>} + \blue{<var>fraction(LCM + SIMP_N1 * LCM / SIMP_D1, LCM)</var>} <var>SIGN</var>
150 \pink{<var>abs(W2)</var>} <var>SIGN</var> \pink{<var>fraction(SIMP_N2 * LCM / SIMP_D2, LCM)</var>}
151 </code></p>
152
bfbfd36 @petercollingridge Add some explanation to the hints
petercollingridge authored
153 <div>
154 <p><code>\qquad =
155 \blue{<var>W1</var>} <var>SIGN</var> \pink{<var>abs(W2)</var>} +
156 \blue{<var>fraction(LCM + SIMP_N1 * LCM / SIMP_D1, LCM)</var>}<var>SIGN</var> \pink{<var>fraction(SIMP_N2 * LCM / SIMP_D2, LCM)</var>}
157 </code></p>
158 <p><code>\qquad =
159 <var>W1 + W2 </var> + \blue{<var>fraction(LCM + SIMP_N1 * LCM / SIMP_D1, LCM)</var>} <var>SIGN</var>
160 \pink{<var>fraction(SIMP_N2 * LCM / SIMP_D2, LCM)</var>}
161 </code></p>
162 </div>
c823ad0 @petercollingridge Simplify hints
petercollingridge authored
163
bfbfd36 @petercollingridge Add some explanation to the hints
petercollingridge authored
164 <div>
165 <p><code>\qquad =
166 <var>W1 + W2</var> + <var>fraction((LCM + SIMP_N1 * LCM / SIMP_D1) + (PM * SIMP_N2 * LCM / SIMP_D2), LCM)</var>
167 </code></p>
168 <p><code>\qquad =
169 <var>W1 + W2</var><var>fraction((LCM + SIMP_N1 * LCM / SIMP_D1) + PM * SIMP_N2 * LCM / SIMP_D2, LCM)</var>
170 </code></p>
171 <p data-if="GCD > 1"><code>=
172 <var>W1 + W2 + fractionReduce((LCM + SIMP_N1 * LCM / SIMP_D1) + PM * SIMP_N2 * LCM / SIMP_D2, LCM)</var>
173 </code></p>
174 </div>
9212f6f @beneater Add problem types to adding_and_subtracting_mixed_numbers_*
beneater authored
175 </div>
176 </div>
177 </div>
4e4cb9b @beneater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
178 </div>
cde9e9f @jeresig Re-run the exercises through the updated cleaner.
jeresig authored
179 </body>
180 </html>
Something went wrong with that request. Please try again.