Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 87 lines (77 sloc) 4.072 kb
319325c @marcia Add exercise -- simplifying fractions
marcia authored
1 <!DOCTYPE html>
cde9e9f @jeresig Re-run the exercises through the updated cleaner.
jeresig authored
2 <html data-require="math word-problems">
3 <head>
0f0c630 @cbhl 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 @beneater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
5 <title>Simplifying fractions</title>
ac1415e @spicyj Use requirejs for module loading
spicyj authored
6 <script data-main="../local-only/main.js" src="../local-only/require.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">
0f0c630 @cbhl Clean up the exercise files using the new cleaning utility. (II)
cbhl authored
10 <div class="vars" data-ensure="! (getGCD ( NUM, DENOM ) === NUM || getGCD ( NUM, DENOM) === DENOM)">
4e4cb9b @beneater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
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>
e6378d8 @petercollingridge More explanation of GCF
petercollingridge authored
15 <var id="GCD_FACTORS">getPrimeFactorization(GCD)</var>
4e4cb9b @beneater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
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>
aa85809 @beneater Don't penalize non-simplification unless specifically configured to do s...
beneater authored
38 <p class="solution" data-type="rational" data-simplify="enforced"><var>NUM / DENOM</var></p>
4e4cb9b @beneater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
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
e6378d8 @petercollingridge More explanation of GCF
petercollingridge authored
45 <p>What is the greatest common factor (GCF) of <code><var>NUM</var></code> and <code><var>DENOM</var></code>?</p>
075f731 @spicyj Space/tab cleanup
spicyj authored
46
e9807ff @jeresig Clean up the exercise files using the new cleaning utility.
jeresig authored
47 <p><code><var>NUM</var> = <var>getPrimeFactorization( NUM ).join( "\\cdot" )</var></code><br>
4e4cb9b @beneater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
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
e6378d8 @petercollingridge More explanation of GCF
petercollingridge authored
50 <p data-if="isPrime(GCD)">
51 The only common factor of <code><var>NUM</var></code> and <code><var>DENOM</var></code> is <code><var>GCD</var></code>.
52 </p>
53 <div data-else="">
54 <p>The common factors of <code><var>NUM</var></code> and <code><var>DENOM</var></code> are <var>toSentenceTex(GCD_FACTORS)</var>.</p>
55 <p>So the greatest common factor is <code><var>GCD_FACTORS.join("\\cdot")</var> = <var>GCD</var></code></p>
56 </div>
075f731 @spicyj Space/tab cleanup
spicyj authored
57
4e4cb9b @beneater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
58 <p>
59 <code>\dfrac{<var>NUM</var>}{<var>DENOM</var>}
60 = \dfrac{<var>NUM / GCD</var> \cdot <var>GCD</var>}{ <var>DENOM / GCD</var>\cdot <var>GCD</var>}</code>
61 </p>
075f731 @spicyj Space/tab cleanup
spicyj authored
62
4e4cb9b @beneater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
63 <p>
64 <code>\hphantom{\dfrac{<var>NUM</var>}{<var>DENOM</var>}}
65 = \dfrac{<var>NUM / GCD</var>}{<var>DENOM / GCD</var>} \cdot \dfrac{<var>GCD</var>}{<var>GCD</var>}</code>
66 </p>
075f731 @spicyj Space/tab cleanup
spicyj authored
67
4e4cb9b @beneater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
68 <p>
69 <code>\hphantom{\dfrac{<var>NUM</var>}{<var>DENOM</var>}}
70 = \dfrac{<var>NUM / GCD</var>}{<var>DENOM / GCD</var>} \cdot 1</code>
71 </p>
72 <p>
73 <code>\hphantom{\dfrac{<var>NUM</var>}{<var>DENOM</var>}}
74 = \dfrac{<var>NUM / GCD</var>}{<var>DENOM / GCD</var>}</code>
75 </p>
e9807ff @jeresig Clean up the exercise files using the new cleaning utility.
jeresig authored
76 <div data-if="GCD_FACTORS.length !== 1" data-unwrap="">
4e4cb9b @beneater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
77 <p>You can also solve this problem by repeatedly breaking the numerator and denominator into common factors.</p>
78 <div>
79 <p>For example:</p>
80 <p><code><var>HINT</var></code></p>
81 </div>
82 </div>
83 </div>
84 </div>
cde9e9f @jeresig Re-run the exercises through the updated cleaner.
jeresig authored
85 </body>
86 </html>
Something went wrong with that request. Please try again.