Permalink
Newer
Older
100644 56 lines (53 sloc) 1.74 KB
1
<!DOCTYPE html>
2
<html data-require="math math-format graphie graphie-helpers">
3
<head>
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
<title>Subtracting fractions with common denominators</title>
6
<script src="../khan-exercise.js"></script>
7
</head>
8
<body>
9
<div class="exercise">
10
<div class="vars">
11
<var id="N1">randRange( 2, 10 )</var>
12
<var id="N2">randRange( 1, N1 - 1 )</var>
13
<var id="D">randRange( 10, 20 )</var>
14
</div>
15
16
<div class="problems">
17
<div>
Jul 27, 2011
19
<p><code><var>fraction( N1, D )</var> - <var>fraction( N2, D )</var> = {?}</code></p>
21
<div class="solution" data-type="rational"><var>( N1 - N2 ) / D</var></div>
22
</div>
23
</div>
24
25
<div class="hints">
Jul 27, 2011
26
<div class="graphie" id="pie" style="float: left">
27
init({ range: [ [-3, 3], [-3, 3] ], scale: 25 });
Jul 27, 2011
28
PIECH = piechart( [ N1, D - 1 ], ["#e00", "#999"], 2 );
31
<div class="graphie">
32
init({ range: [ [-3, 3], [-3, 3] ], scale: 25 });
33
piechart( [ N1-N2,N2, D - 1 ], ["#e00","#122", "#999"], 2 );
34
</div>
35
<p>Subtract the numerators.</p>
Jul 27, 2011
36
</div>
37
<div>
38
<div class="graphie">
39
init({ range: [ [-3, 3], [-3, 3] ], scale: 25 });
40
piechart( [ N1 - N2, D - 1 ], ["#e00", "#999"], 2 );
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 });
48
piechart( [ reduce(N1 - N2 , D)[0] , reduce(N1 - N2, D)[1] - 1 ], ["#e00", "#999"], 2 );
49
</div>
50
<p><code><var>fraction( N1 - N2, D )</var> = <var>fractionReduce( N1 - N2, D )</var></code></p>
51
</div>
52
</div>
53
</div>