Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 81 lines (71 sloc) 3.64 kB
319325c @marcia Add exercise -- simplifying fractions
marcia authored
1 <!DOCTYPE html>
2 <html data-require="math word-problems">
3 <head>
4e4cb9b @beneater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>Simplifying fractions</title>
6 <script src="../khan-exercise.js"></script>
319325c @marcia Add exercise -- simplifying fractions
marcia authored
7 </head>
8 <body>
4e4cb9b @beneater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
9 <div class="exercise">
10 <div class="vars" data-ensure="! (getGCD ( NUM, DENOM ) === NUM || getGCD ( NUM, DENOM) === DENOM)">
11 <var id="FACTOR">randRange( 3, 15 )</var>
12 <var id="NUM">randRange(2, 10) * FACTOR</var>
13 <var id="DENOM">randRange(2, 10) * FACTOR</var>
14 <var id="GCD">getGCD( NUM, DENOM )</var>
15 <var id="GCD_FACTORS">getPrimeFactorization( GCD )</var>
16 <var id="HINT">
17 (function(){
18 var factorValue = 1;
19 var factorDisplay = "";
20 var hint = "\\dfrac{" + NUM + "}{" + DENOM + "}";
21 $.each( GCD_FACTORS, function( index, value) {
22 factorValue *= value;
23 var dot = index === 0 ? "" : "\\cdot ";
24 factorDisplay += dot + value;
25 hint += "= \\dfrac{" + factorDisplay + "\\cdot" + NUM / factorValue + "}{" + factorDisplay + "\\cdot" + DENOM / factorValue + "}";
26 });
27 hint += "= \\dfrac{" + NUM / GCD + "}{" + DENOM / GCD + "}";
41941b3 @marcia White space clean up
marcia authored
28
4e4cb9b @beneater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
29 return hint;
30 })()
31 </var>
32 </div>
319325c @marcia Add exercise -- simplifying fractions
marcia authored
33
4e4cb9b @beneater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
34 <div class="problems">
35 <div>
36 <p class="problem">Simplify to lowest terms.</p>
37 <p class="question"><code>\dfrac{<var>NUM</var>}{<var>DENOM</var>}</code></p>
38 <p class="solution" data-type="rational"><var>NUM / DENOM</var></p>
39 </div>
40 </div>
319325c @marcia Add exercise -- simplifying fractions
marcia authored
41
4e4cb9b @beneater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
42 <div class="hints">
43 <p data-if="GCD_FACTORS.length !== 1">There are several ways to tackle this problem.</p>
075f731 @spicyj Space/tab cleanup
spicyj authored
44
4e4cb9b @beneater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
45 <p>What is the greatest common factor (GCD) of <var>NUM</var> and <var>DENOM</var>?</p>
075f731 @spicyj Space/tab cleanup
spicyj authored
46
4e4cb9b @beneater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
47 <p><code><var>NUM</var> = <var>getPrimeFactorization( NUM ).join( "\\cdot" )</var></code><br />
48 <code><var>DENOM</var> = <var>getPrimeFactorization( DENOM ).join( "\\cdot" )</var></code></p>
d8a4f39 @kd5bjo Issue #5950: Improve hints for simplifying fractions
kd5bjo authored
49
4e4cb9b @beneater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
50 <p><code>\mbox{GCD}(<var>NUM</var>, <var>DENOM</var>)<span data-if="!isPrime(GCD)"> = <var>GCD_FACTORS.join( "\\cdot" )</var></span> = <var>GCD</var></code></p>
075f731 @spicyj Space/tab cleanup
spicyj authored
51
4e4cb9b @beneater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
52 <p>
53 <code>\dfrac{<var>NUM</var>}{<var>DENOM</var>}
54 = \dfrac{<var>NUM / GCD</var> \cdot <var>GCD</var>}{ <var>DENOM / GCD</var>\cdot <var>GCD</var>}</code>
55 </p>
075f731 @spicyj Space/tab cleanup
spicyj authored
56
4e4cb9b @beneater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
57 <p>
58 <code>\hphantom{\dfrac{<var>NUM</var>}{<var>DENOM</var>}}
59 = \dfrac{<var>NUM / GCD</var>}{<var>DENOM / GCD</var>} \cdot \dfrac{<var>GCD</var>}{<var>GCD</var>}</code>
60 </p>
075f731 @spicyj Space/tab cleanup
spicyj authored
61
4e4cb9b @beneater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
62 <p>
63 <code>\hphantom{\dfrac{<var>NUM</var>}{<var>DENOM</var>}}
64 = \dfrac{<var>NUM / GCD</var>}{<var>DENOM / GCD</var>} \cdot 1</code>
65 </p>
66 <p>
67 <code>\hphantom{\dfrac{<var>NUM</var>}{<var>DENOM</var>}}
68 = \dfrac{<var>NUM / GCD</var>}{<var>DENOM / GCD</var>}</code>
69 </p>
70 <div data-if="GCD_FACTORS.length !== 1" data-unwrap>
71 <p>You can also solve this problem by repeatedly breaking the numerator and denominator into common factors.</p>
72 <div>
73 <p>For example:</p>
74 <p><code><var>HINT</var></code></p>
75 </div>
76 </div>
77 </div>
78 </div>
319325c @marcia Add exercise -- simplifying fractions
marcia authored
79 </body>
cf02179 @spicyj Strip trailing whitespace
spicyj authored
80 </html>
Something went wrong with that request. Please try again.