Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 122 lines (114 sloc) 6.225 kB
a0106e4 @marcia Add exercise -- comparing fractions 1
marcia authored
1 <!DOCTYPE html>
4c19def @spicyj graphie for comparing_fractions_1
spicyj authored
2 <html data-require="math graphie graphie-helpers word-problems">
a0106e4 @marcia Add exercise -- comparing fractions 1
marcia authored
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>Comparing fractions 1</title>
6 <script src="../khan-exercise.js"></script>
a0106e4 @marcia Add exercise -- comparing fractions 1
marcia authored
7 </head>
8 <body>
4e4cb9b @beneater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
9 <!--
10 Compares fractions that have the same numerator or have the same denominator.
11 TODO: would like to draw overlapping circles or rectangle slices for hints.
12 -->
13 <div class="exercise">
14 <div class="problems">
15 <div id="same-numerator">
16 <div class="vars" data-ensure="DEN_1 !== DEN_2">
17 <var id="NUM_1">randRange( 1, 14 )</var>
18 <var id="DEN_1">randRange( NUM_1 + 1, 15 )</var>
6371709 @spicyj Whitespace cleanup!
spicyj authored
19
4e4cb9b @beneater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
20 <var id="NUM_2">NUM_1</var>
21 <var id="DEN_2">randRange( NUM_2 + 1, 15 )</var>
a0106e4 @marcia Add exercise -- comparing fractions 1
marcia authored
22
4e4cb9b @beneater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
23 <var id="SOLUTION">(function() {
24 if ( DEN_1 &lt; DEN_2 ) {
25 return "&gt;";
26 } else {
27 return "&lt;";
28 }
29 })()</var>
30 <var id="MORE">DEN_1 > DEN_2 ? "more" : "fewer"</var>
31 <var id="SMALLER">DEN_1 > DEN_2 ? "smaller" : "bigger"</var>
32 <var id="LESS">DEN_1 > DEN_2 ? "less" : "more"</var>
33 <var id="BIGGER">SMALLER === "smaller" ? "bigger" : "smaller"</var>
34 </div>
6371709 @spicyj Whitespace cleanup!
spicyj authored
35
4e4cb9b @beneater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
36 <div class="problem">
37 <p>Fill in the blank.</p>
38 <p>
39 <code>\dfrac{<var>NUM_1</var>}{<var>DEN_1</var>}</code>
40 ____ <code>\dfrac{<var>NUM_2</var>}{<var>DEN_2</var>}</code>
41 </p>
42 </div>
43 <p class="solution"><code><var>SOLUTION</var></code></p>
44 <ul class="choices" data-category="true">
45 <li><code>&lt;</code></li>
46 <li><code>&gt;</code></li>
47 </ul>
48 <div class="hints">
49 <div>
50 <p>This is like comparing two equally sized pizzas where one is cut into <var>DEN_1</var> equal slices and the other is cut into <var>DEN_2</var> equal slices.</p>
51 <div style="height: 150px;">
52 <div class="graphie" style="float: left">
53 init({ range: [ [-3, 3], [-3, 3] ], scale: 25 });
54 piechart( [NUM_1, DEN_1 - NUM_1], ["#e00", "#999"], 2 );
55 </div>
56 <div class="graphie" style="float: left">
57 init({ range: [ [-3, 3], [-3, 3] ], scale: 25 });
58 piechart( [NUM_2, DEN_2 - NUM_2], ["#e00", "#999"], 2 );
59 </div>
60 </div>
61 </div>
62 <p>Note that cutting a pizza into more slices will result in smaller slices.</p>
63 <p>The left fraction represents a pizza with <var>MORE</var> slices, and so each slice is <var>SMALLER</var>.</p>
64 <p><var>NUM_1</var> <var>SMALLER</var> slice<var>plural( NUM_1 )</var> is <var>LESS</var> pizza than <var>NUM_2</var> <var> BIGGER</var> slice<var>plural( NUM_2 )</var>.</p>
65 <p>So, <code>\dfrac{<var>NUM_1</var>}{<var>DEN_1</var>} <var>SOLUTION</var> \dfrac{<var>NUM_2</var>}{<var>DEN_2</var>}</code>.</p>
66 </div>
67 </div>
6371709 @spicyj Whitespace cleanup!
spicyj authored
68
4e4cb9b @beneater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
69 <div id="same-denominator">
70 <div class="vars" data-ensure="NUM_1 !== NUM_2">
71 <var id="NUM_1">randRange( 1, 14 )</var>
72 <var id="DEN_1">randRange( NUM_1 + 1, 15 )</var>
6371709 @spicyj Whitespace cleanup!
spicyj authored
73
4e4cb9b @beneater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
74 <var id="DEN_2">DEN_1</var>
75 <var id="NUM_2">randRange( 1, DEN_2 - 1 )</var>
a0106e4 @marcia Add exercise -- comparing fractions 1
marcia authored
76
4e4cb9b @beneater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
77 <var id="SOLUTION">(function() {
78 if ( NUM_1 &lt; NUM_2 ) {
79 return "&lt;";
80 } else {
81 return "&gt;";
82 }
83 })()</var>
84 <var id="LESS">NUM_1 &lt; NUM_2 ? "less" : "more"</var>
85 </div>
6371709 @spicyj Whitespace cleanup!
spicyj authored
86
4e4cb9b @beneater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
87 <div class="problem">
88 <p>Fill in the blank.</p>
89 <p>
90 <code>\dfrac{<var>NUM_1</var>}{<var>DEN_1</var>}</code>
91 ____ <code>\dfrac{<var>NUM_2</var>}{<var>DEN_2</var>}</code>
92 </p>
93 </div>
94 <p class="solution"><code><var>SOLUTION</var></code></p>
95 <ul class="choices" data-category="true">
96 <li><code>&lt;</code></li>
97 <li><code>&gt;</code></li>
98 </ul>
99 <div class="hints">
100 <div>
101 <p>This is like considering two equally sized pizzas that have been cut into <var>DEN_1</var> equal slices.</p>
102 <p>Since both pizzas have the same number of slices, all the slices are the same size.</p>
103 <div style="height: 150px;">
104 <div class="graphie" style="float: left">
105 init({ range: [ [-3, 3], [-3, 3] ], scale: 25 });
106 piechart( [NUM_1, DEN_1 - NUM_1], ["#e00", "#999"], 2 );
107 </div>
108 <div class="graphie" style="float: left">
109 init({ range: [ [-3, 3], [-3, 3] ], scale: 25 });
110 piechart( [NUM_2, DEN_2 - NUM_2], ["#e00", "#999"], 2 );
111 </div>
112 </div>
113 </div>
114 <p><var>plural( NUM_1, "slice" )</var> is <var>LESS</var> pizza than <var>plural( NUM_2, "slice" )</var>.</p>
115 <p>So, <code>\dfrac{<var>NUM_1</var>}{<var>DEN_1</var>} <var>SOLUTION</var> \dfrac{<var>NUM_2</var>}{<var>DEN_2</var>}</code>.</p>
116 </div>
117 </div>
118 </div>
119 </div>
a0106e4 @marcia Add exercise -- comparing fractions 1
marcia authored
120 </body>
6371709 @spicyj Whitespace cleanup!
spicyj authored
121 </html>
Something went wrong with that request. Please try again.