Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 57 lines (54 sloc) 2.251 kb
3be4f32 Marcia Lee Add exercises -- +/- fractions with common denominators
marcia authored
1 <!DOCTYPE html>
cde9e9f John Resig Re-run the exercises through the updated cleaner.
jeresig authored
2 <html data-require="math math-format graphie graphie-helpers">
3 <head>
0f0c630 Michael Chang 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 Ben Eater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
5 <title>Subtracting fractions with common denominators</title>
ac1415e Ben Alpert Use requirejs for module loading
spicyj authored
6 <script data-main="../local-only/main.js" src="../local-only/require.js"></script>
3be4f32 Marcia Lee Add exercises -- +/- fractions with common denominators
marcia authored
7 </head>
8 <body>
4e4cb9b Ben Eater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
9 <div class="exercise">
233a0b9 Ben Eater Rearrange answer area content within some exercises
beneater authored
10 <div class="vars" data-ensure="D > N1 && D !== 100">
4e4cb9b Ben Eater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
11 <var id="N1">randRange( 2, 10 )</var>
12 <var id="N2">randRange( 1, N1 - 1 )</var>
add75bc Peter Collingridge Switch to using allowed denominators
petercollingridge authored
13 <var id="D">randFromArray(denominators)</var>
4e4cb9b Ben Eater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
14 </div>
3be4f32 Marcia Lee Add exercises -- +/- fractions with common denominators
marcia authored
15
4e4cb9b Ben Eater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
16 <div class="problems">
17 <div>
18 <div class="question">
19 <p><code><var>fraction( N1, D )</var> - <var>fraction( N2, D )</var> = {?}</code></p>
20 </div>
0f0c630 Michael Chang Clean up the exercise files using the new cleaning utility. (II)
cbhl authored
21 <div class="solution" data-simplify="optional" data-type="rational"><var>( N1 - N2 ) / D</var></div>
4e4cb9b Ben Eater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
22 </div>
23 </div>
3be4f32 Marcia Lee Add exercises -- +/- fractions with common denominators
marcia authored
24
4e4cb9b Ben Eater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
25 <div class="hints">
0f0c630 Michael Chang Clean up the exercise files using the new cleaning utility. (II)
cbhl authored
26 <div class="graphie" id="pie" style="float: left">
4e4cb9b Ben Eater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
27 init({ range: [ [-3, 3], [-3, 3] ], scale: 25 });
52d6f42 Peter Collingridge Allow decimal answers
petercollingridge authored
28 PIECH = piechart([N1, D - N1], ["#e00", "#999"], 2);
4e4cb9b Ben Eater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
29 </div>
30 <div>
31 <div class="graphie">
32 init({ range: [ [-3, 3], [-3, 3] ], scale: 25 });
52d6f42 Peter Collingridge Allow decimal answers
petercollingridge authored
33 piechart([N1 - N2, N2, D - N1], ["#e00","#122", "#999"], 2);
4e4cb9b Ben Eater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
34 </div>
35 <p>Subtract the numerators.</p>
36 </div>
37 <div>
38 <div class="graphie">
39 init({ range: [ [-3, 3], [-3, 3] ], scale: 25 });
52d6f42 Peter Collingridge Allow decimal answers
petercollingridge authored
40 piechart([N1 - N2, D - N1 + N2], ["#e00", "#999"], 2);
4e4cb9b Ben Eater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
41 </div>
42 <p><code><var>fraction( N1, D )</var> - <var>fraction( N2, D )</var> = <var>fraction( N1 - N2, D )</var></code></p>
43 </div>
44 <div data-if="getGCD( N1 - N2, D ) !== 1">
45 <p>Simplify.</p>
46 <div class="graphie">
47 init({ range: [ [-3, 3], [-3, 3] ], scale: 25 });
52d6f42 Peter Collingridge Allow decimal answers
petercollingridge authored
48 var frac = reduce(N1 - N2 , D);
49 piechart([frac[0], frac[1] - frac[0]], ["#e00", "#999"], 2);
4e4cb9b Ben Eater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
50 </div>
51 <p><code><var>fraction( N1 - N2, D )</var> = <var>fractionReduce( N1 - N2, D )</var></code></p>
52 </div>
53 </div>
54 </div>
cde9e9f John Resig Re-run the exercises through the updated cleaner.
jeresig authored
55 </body>
56 </html>
Something went wrong with that request. Please try again.