Permalink
Browse files

Add exercises -- +/- fractions with common denominators

  • Loading branch information...
marcia committed Jul 16, 2011
1 parent 81e0c90 commit 3be4f320d5f6161233a521185039edac7768f69e
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<html data-require="math math-format graphie graphie-helpers">
+<head>
+ <title>Adding Fractions with Common Denominators</title>
+ <script src="../khan-exercise.js"></script>
+</head>
+<body>
+ <div class="exercise">
+ <div class="vars">
+ <var id="N1">randRange( 1, 9 )</var>
+ <var id="N2">randRange( 1, 9 )</var>
+ <var id="D">randRange( N1 + N2 + 1, 20 )</var>
+ </div>
+
+ <div class="problems">
+ <div>
+ <p class="question"><code><var>fraction( N1, D )</var> + <var>fraction( N2, D )</var> = ?</code></p>
+ <div class="solution" data-type="rational">( N1 + N2 ) / D </div>
+ </div>
+ </div>
+
+ <div class="hints">
+ <div style="height: 150px;">
+ <div class="graphie" style="float: left">
+ init({ range: [ [-3, 3], [-3, 3] ], scale: 25 });
+ piechart( [ N1, D - N1 ], ["#e00", "#999"], 2 );
+ </div>
+ <div class="graphie" style="float: left;">
+ init({ range: [ [-3, 3], [-3, 3] ], scale: 25 });
+ piechart( [ N2, D - N2 ], ["#e00", "#999"], 2 );
+ </div>
+ </div>
+ <div>
+ <p>Add the numerators.</p>
+ <p><code><var>fraction( N1, D )</var> + <var>fraction( N2, D )</var> = <var>fraction( N1 + N2, D )</var></code></p>
+ </div>
+ <div data-if="getGCD( N1 + N2, D ) !== 1">
+ <p>Simplify.</p>
+ <p><code><var>fraction( N1 + N2, D )</var> = <var>fractionReduce( N1 + N2, D )</var></code></p>
+ </div>
+ </div>
+</body>
+</html>
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<html data-require="math math-format graphie graphie-helpers">
+<head>
+ <title>Subtracting Fractions with Common Denominators</title>
+ <script src="../khan-exercise.js"></script>
+</head>
+<body>
+ <div class="exercise">
+ <div class="vars">
+ <var id="N1">randRange( 2, 10 )</var>
+ <var id="N2">randRange( 1, N1 - 1 )</var>
+ <var id="D">randRange( 10, 20 )</var>
+ </div>
+
+ <div class="problems">
+ <div>
+ <p class="question"><code><var>fraction( N1, D )</var> - <var>fraction( N2, D )</var> = ?</code></p>
+ <div class="solution" data-type="rational">( N1 - N2 ) / D </div>
+ </div>
+ </div>
+
+ <div class="hints">
+ <div style="height: 150px;">
+ <div class="graphie" style="float: left">
+ init({ range: [ [-3, 3], [-3, 3] ], scale: 25 });
+ piechart( [ N1, D - N1 ], ["#e00", "#999"], 2 );
+ </div>
+ <div class="graphie" style="float: left;">
+ init({ range: [ [-3, 3], [-3, 3] ], scale: 25 });
+ piechart( [ N2, D - N2 ], ["#e00", "#999"], 2 );
+ </div>
+ </div>
+ <div>
+ <p>Subtract the numerators.</p>
+ <p><code><var>fraction( N1, D )</var> - <var>fraction( N2, D )</var> = <var>fraction( N1 - N2, D )</var></code></p>
+ </div>
+ <div data-if="getGCD( N1 - N2, D ) !== 1">
+ <p>Simplify.</p>
+ <p><code><var>fraction( N1 - N2, D )</var> = <var>fractionReduce( N1 - N2, D )</var></code></p>
+ </div>
+ </div>
+</body>
+</html>

0 comments on commit 3be4f32

Please sign in to comment.