Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 56 lines (53 sloc) 1.741 kB
3be4f32 @marcia Add exercises -- +/- fractions with common denominators
marcia authored
1 <!DOCTYPE html>
2 <html data-require="math math-format graphie graphie-helpers">
3 <head>
72418b8 @jeresig Add meta charset to all HTML pages.
jeresig authored
4 <meta charset="UTF-8" />
07d95d3 @spicyj Rename EVERYTHING; closes #323.
spicyj authored
5 <title>Subtracting fractions with common denominators</title>
3be4f32 @marcia Add exercises -- +/- fractions with common denominators
marcia authored
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>
d77f1ac @igorT made exercise subtracting fractions nicer so it keeps the pies you we…
igorT authored
18 <div class="question">
3f60401 @spicyj = ? formatting
spicyj authored
19 <p><code><var>fraction( N1, D )</var> - <var>fraction( N2, D )</var> = {?}</code></p>
d77f1ac @igorT made exercise subtracting fractions nicer so it keeps the pies you we…
igorT authored
20 </div>
b5754b6 @jruberg datatype 'improper' -> 'rational'. fixes #1075.
jruberg authored
21 <div class="solution" data-type="rational"><var>( N1 - N2 ) / D</var></div>
3be4f32 @marcia Add exercises -- +/- fractions with common denominators
marcia authored
22 </div>
23 </div>
24
25 <div class="hints">
800e9f9 @igorT fix #267
igorT authored
26 <div class="graphie" id="pie" style="float: left">
3be4f32 @marcia Add exercises -- +/- fractions with common denominators
marcia authored
27 init({ range: [ [-3, 3], [-3, 3] ], scale: 25 });
800e9f9 @igorT fix #267
igorT authored
28 PIECH = piechart( [ N1, D - 1 ], ["#e00", "#999"], 2 );
3be4f32 @marcia Add exercises -- +/- fractions with common denominators
marcia authored
29 </div>
30 <div>
d77f1ac @igorT made exercise subtracting fractions nicer so it keeps the pies you we…
igorT authored
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>
3be4f32 @marcia Add exercises -- +/- fractions with common denominators
marcia authored
35 <p>Subtract the numerators.</p>
800e9f9 @igorT fix #267
igorT authored
36 </div>
37 <div>
d77f1ac @igorT made exercise subtracting fractions nicer so it keeps the pies you we…
igorT authored
38 <div class="graphie">
39 init({ range: [ [-3, 3], [-3, 3] ], scale: 25 });
40 piechart( [ N1 - N2, D - 1 ], ["#e00", "#999"], 2 );
41 </div>
3be4f32 @marcia Add exercises -- +/- fractions with common denominators
marcia authored
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>
d77f1ac @igorT made exercise subtracting fractions nicer so it keeps the pies you we…
igorT authored
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>
3be4f32 @marcia Add exercises -- +/- fractions with common denominators
marcia authored
50 <p><code><var>fraction( N1 - N2, D )</var> = <var>fractionReduce( N1 - N2, D )</var></code></p>
51 </div>
52 </div>
2c3690b @spicyj Make everything validate
spicyj authored
53 </div>
3be4f32 @marcia Add exercises -- +/- fractions with common denominators
marcia authored
54 </body>
55 </html>
Something went wrong with that request. Please try again.