Skip to content
This repository
Newer
Older
100644 51 lines (48 sloc) 2.276 kb
9e59905f »
2011-07-13 Add exercise -- multiplying decimals
1 <!DOCTYPE html>
2 <html data-require="math math-format">
3 <head>
4e4cb9b1 »
2012-04-10 lint: tabs->spaces and jQuery->$ for exercises
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>Adding and subtracting fractions</title>
6 <script src="../khan-exercise.js"></script>
9e59905f »
2011-07-13 Add exercise -- multiplying decimals
7 </head>
8 <body>
4e4cb9b1 »
2012-04-10 lint: tabs->spaces and jQuery->$ for exercises
9 <div class="exercise">
10 <div class="vars" data-ensure="D1 !== D2">
11 <var id="N1">randRangeNonZero( -9, 9 )</var>
12 <var id="N2">randRangeNonZero( -9, 9 )</var>
13 <var id="D1">randRangeExclude( 2, 9, [ N1, -N1 ] )</var>
14 <var id="D2">randRangeExclude( 2, 9, [ N2, -N2 ] )</var>
15 <var id="LCM">getLCM( D1, D2 )</var>
16 <var id="F1">LCM / D1</var>
17 <var id="F2">LCM / D2</var>
18 </div>
9e59905f »
2011-07-13 Add exercise -- multiplying decimals
19
4e4cb9b1 »
2012-04-10 lint: tabs->spaces and jQuery->$ for exercises
20 <div class="problems">
21 <div>
22 <div class="question">
23 <p><code><var>fraction( N1, D1 )</var> + <var>fraction( N2, D2 )</var> = {?}</code></p>
24 </div>
25 <div class="solution" data-type="rational"><var>N1 / D1 + N2 / D2</var></div>
26 </div>
27 </div>
9e59905f »
2011-07-13 Add exercise -- multiplying decimals
28
4e4cb9b1 »
2012-04-10 lint: tabs->spaces and jQuery->$ for exercises
29 <div class="hints">
30 <p>First, we need to find a common denominator. The least common multiple of <code><var>D1</var></code> and <code><var>D2</var></code> is the smallest possible common denominator.</p>
31 <p><code>\lcm(<var>D1</var>, <var>D2</var>) = <var>LCM</var></code></p>
32 <p>Now, we need to change both fractions to have a denominator of <code><var>LCM</var></code>.</p>
33 <p><code>\begin{align*}<var>fraction( N1, D1 )</var>\cdot <var>fraction( F1, F1 )</var> &= <var>fraction( N1 * F1, LCM )</var>\\
34 <var>fraction( N2, D2 )</var>\cdot <var>fraction( F2, F2 )</var> &= <var>fraction( N2 * F2, LCM )</var>\end{align*}</code></p>
35 <div>
36 <p>So, the problem becomes:</p>
37 <p><code><var>fraction( N1 * F1, LCM )</var> + <var>fraction( N2 * F2, LCM )</var> = {?}</code></p>
38 </div>
39 <div>
40 <p><var>N2 &gt; 0 ? "Add" : "Subtract"</var> the numerators.</p>
41 <p><code><var>fraction( F1 * N1 + F2 * N2, LCM)</var></code></p>
42 </div>
43 <div data-if="getGCD( F1 * N1 + F2 * N2, LCM ) !== 1">
44 <p>Simplify.</p>
45 <p><code><var>fractionReduce( F1 * N1 + F2 * N2, LCM )</var></code></p>
46 </div>
47 </div>
48 </div>
9e59905f »
2011-07-13 Add exercise -- multiplying decimals
49 </body>
50 </html>
Something went wrong with that request. Please try again.