Skip to content
This repository
Newer
Older
100644 114 lines (102 sloc) 6.98 kb
0e95f189 »
2011-10-20 Add new line for integration regex to grab header stuffs
1 <!DOCTYPE html>
2 <html data-require="math math-format graphie graphie-helpers word-problems slice-clone">
ebb3ac5d »
2011-09-29 Add fractions_cut_and_copy_1.html
3 <head>
4e4cb9b1 »
2012-04-10 lint: tabs->spaces and jQuery->$ for exercises
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>Fractions cut and copy 1</title>
6 <script src="../khan-exercise.js"></script>
ebb3ac5d »
2011-09-29 Add fractions_cut_and_copy_1.html
7 </head>
8 <body>
4e4cb9b1 »
2012-04-10 lint: tabs->spaces and jQuery->$ for exercises
9 <div class="exercise">
10 <div class="vars">
11 <!-- An integer will be a starting or ending quantity 1/3 of the time -->
4d6fd619 »
2012-08-23 Port fractions cut and copy 1 to use a custom answer type
12 <var id="D_PARENT">randRangeWeighted(3, 12, 1, 1 / 6)</var>
13 <var id="D_OFFSPRING">D_PARENT === 1 ? randRange(3, 12) : (rand(5) > 0 ? D_PARENT : 1)</var>
4e4cb9b1 »
2012-04-10 lint: tabs->spaces and jQuery->$ for exercises
14 <div data-ensure="getGCD( N_PARENT * ( D_PARENT === 1 ? D_OFFSPRING : 1 ), N_OFFSPRING * ( D_OFFSPRING === 1 ? D_PARENT : 1 ) ) === 1 && N_PARENT / D_PARENT > N_OFFSPRING / D_OFFSPRING">
4d6fd619 »
2012-08-23 Port fractions cut and copy 1 to use a custom answer type
15 <var id="N_PARENT">D_PARENT === 1 ? randRange(1, 4) : randRangeExclude(2, 2 * D_PARENT - 1, [D_PARENT])</var>
16 <var id="N_OFFSPRING">D_OFFSPRING === 1 ? randRange(1, 4) : randRangeExclude(2, 2 * D_OFFSPRING - 1, [D_OFFSPRING])</var>
4e4cb9b1 »
2012-04-10 lint: tabs->spaces and jQuery->$ for exercises
17 </div>
4d6fd619 »
2012-08-23 Port fractions cut and copy 1 to use a custom answer type
18 <var id="CODE_PARENT">D_PARENT === 1 ? N_PARENT : mixedOrImproper(N_PARENT, D_PARENT)</var>
19 <var id="CODE_OFFSPRING">D_OFFSPRING === 1 ? N_OFFSPRING : mixedOrImproper(N_OFFSPRING, D_OFFSPRING)</var>
4e4cb9b1 »
2012-04-10 lint: tabs->spaces and jQuery->$ for exercises
20 <var id="PARENT">N_PARENT / D_PARENT</var>
21 <var id="OFFSPRING">N_OFFSPRING / D_OFFSPRING</var>
22 <var id="ANSWER">OFFSPRING / PARENT</var>
23 <var id="D">D_PARENT === 1 ? D_OFFSPRING : D_PARENT</var>
4d6fd619 »
2012-08-23 Port fractions cut and copy 1 to use a custom answer type
24 <var id="N_PARENT_EXPANDED">N_PARENT * (D_PARENT === 1 ? D : 1)</var>
25 <var id="N_OFFSPRING_EXPANDED">N_OFFSPRING * (D_OFFSPRING === 1 ? D : 1)</var>
4e4cb9b1 »
2012-04-10 lint: tabs->spaces and jQuery->$ for exercises
26 </div>
ebb3ac5d »
2011-09-29 Add fractions_cut_and_copy_1.html
27
4e4cb9b1 »
2012-04-10 lint: tabs->spaces and jQuery->$ for exercises
28 <div class="problems">
29 <div>
30 <p class="question">The starting block below is <code><var>CODE_PARENT</var></code> units long. Use the tools to the right to convert the starting block into the goal block that is <code><var>CODE_OFFSPRING</var></code> units long. You can see your progress as the current block.</p>
ebb3ac5d »
2011-09-29 Add fractions_cut_and_copy_1.html
31
4e4cb9b1 »
2012-04-10 lint: tabs->spaces and jQuery->$ for exercises
32 <p>Starting Block:</p>
ebb3ac5d »
2011-09-29 Add fractions_cut_and_copy_1.html
33
4e4cb9b1 »
2012-04-10 lint: tabs->spaces and jQuery->$ for exercises
34 <div class="graphie" id="parent_block">
4d6fd619 »
2012-08-23 Port fractions cut and copy 1 to use a custom answer type
35 initSliceClone(["current_block"]);
36 init({range: [[0, 1], [0, 1]], scale: [600, 25 ]});
37 rectchart([1, 0], ["#e00", "#999"]);
4e4cb9b1 »
2012-04-10 lint: tabs->spaces and jQuery->$ for exercises
38 </div>
ebb3ac5d »
2011-09-29 Add fractions_cut_and_copy_1.html
39
4e4cb9b1 »
2012-04-10 lint: tabs->spaces and jQuery->$ for exercises
40 <p>Current Block:</p>
ebb3ac5d »
2011-09-29 Add fractions_cut_and_copy_1.html
41
4e4cb9b1 »
2012-04-10 lint: tabs->spaces and jQuery->$ for exercises
42 <div class="graphie" id="current_block">
4d6fd619 »
2012-08-23 Port fractions cut and copy 1 to use a custom answer type
43 init({ range: [[0, 1], [0, 1] ], scale: [600, 25]});
44 rectchart([1, 0], ["#e00", "#999"]);
4e4cb9b1 »
2012-04-10 lint: tabs->spaces and jQuery->$ for exercises
45 </div>
ebb3ac5d »
2011-09-29 Add fractions_cut_and_copy_1.html
46
4e4cb9b1 »
2012-04-10 lint: tabs->spaces and jQuery->$ for exercises
47 <p>Goal Block:</p>
ebb3ac5d »
2011-09-29 Add fractions_cut_and_copy_1.html
48
4e4cb9b1 »
2012-04-10 lint: tabs->spaces and jQuery->$ for exercises
49 <div class="graphie" id="goal_block">
4d6fd619 »
2012-08-23 Port fractions cut and copy 1 to use a custom answer type
50 init({range: [[0, 1], [0, 1]], scale: [600 * ANSWER, 25]});
51 rectchart([1, 0], [BLUE, "#999"]);
4e4cb9b1 »
2012-04-10 lint: tabs->spaces and jQuery->$ for exercises
52 </div>
ebb3ac5d »
2011-09-29 Add fractions_cut_and_copy_1.html
53
4d6fd619 »
2012-08-23 Port fractions cut and copy 1 to use a custom answer type
54 <div class="solution" data-type="custom">
55 <div class="instruction">
56 <div style="margin-bottom: 10px;">
57 Cut into
58 <input type="button" value="-" class="simple-button" onclick="KhanUtil.changePieces(false)">
59 <span id="pieces" style="display: inline-block; width: 54px; text-align: center;">1 piece</span>
60 <input type="button" value="+" class="simple-button" onclick="KhanUtil.changePieces(true)">
61 </div>
ebb3ac5d »
2011-09-29 Add fractions_cut_and_copy_1.html
62
4d6fd619 »
2012-08-23 Port fractions cut and copy 1 to use a custom answer type
63 <div style="margin-bottom: 10px;">
64 <span style="display:inline-block; width: 42px;">Copy</span>
65 <input type="button" value="-" class="simple-button" onclick="KhanUtil.changeTimes(false, 'current_block')" disabled="disabled">
66 <span id="current_block_times" style="display: inline-block; width: 54px; text-align: center;">1 time</span>
67 <input type="button" value="+" class="simple-button" onclick="KhanUtil.changeTimes(true, 'current_block')">
68 </div>
4e4cb9b1 »
2012-04-10 lint: tabs->spaces and jQuery->$ for exercises
69 </div>
ebb3ac5d »
2011-09-29 Add fractions_cut_and_copy_1.html
70
4d6fd619 »
2012-08-23 Port fractions cut and copy 1 to use a custom answer type
71 <div class="guess">
72 [pieces, times['current_block']]
73 </div>
74 <div class="validator-function">
75 return roundTo(3, guess[1] / guess[0]) === roundTo(3, ANSWER);
76 </div>
77 <div class="show-guess">
78 pieces = guess[0];
79 times['current_block'] = guess[1];
80 updateGraphAndAnswer();
81 </div>
82 <div class="show-guess-solutionarea">
83 $('#pieces').text(plural(guess[0], 'piece'));
011af1e4 »
2012-08-27 Stop using id's as globals (facepalm)
84 $('#current_block_times').text(plural(guess[1], 'time'));
4d6fd619 »
2012-08-23 Port fractions cut and copy 1 to use a custom answer type
85 </div>
4e4cb9b1 »
2012-04-10 lint: tabs->spaces and jQuery->$ for exercises
86 </div>
2773cd90 »
2011-10-17 Hints for fractions_cut_and_copy_1
87
4e4cb9b1 »
2012-04-10 lint: tabs->spaces and jQuery->$ for exercises
88 <div class="hints">
4d6fd619 »
2012-08-23 Port fractions cut and copy 1 to use a custom answer type
89 <p data-if="CODE_PARENT !== fraction(N_PARENT, D)">The starting block of length <code><var>CODE_PARENT</var></code> units
90 can be rewritten as <code><var>fraction(N_PARENT_EXPANDED, D)</var></code>.</p>
91 <p data-if="CODE_OFFSPRING !== fraction(N_OFFSPRING, D)">The goal block of length <code><var>CODE_OFFSPRING</var></code> units
92 can be rewritten as <code><var>fraction(N_OFFSPRING_EXPANDED, D)</var></code>.</p>
4e4cb9b1 »
2012-04-10 lint: tabs->spaces and jQuery->$ for exercises
93 <p>Cutting the starting block into <code>x</code> pieces is the same as dividing it by <code>x</code>.</p>
94 <div>
95 <p>Therefore cutting the starting block into <code><var>N_PARENT_EXPANDED</var></code> pieces is the same as:</p>
96 <p><code>\dfrac{<var>N_PARENT_EXPANDED</var>}{<var>D</var>} ÷ <var>N_PARENT_EXPANDED</var> =
97 \dfrac{<var>N_PARENT_EXPANDED</var>}{<var>D</var>} \cdot \dfrac{1}{<var>N_PARENT_EXPANDED</var>} = \dfrac{1}{<var>D</var>}</code></p>
98 </div>
99 <p>Copying the resulting block <code>y</code> times is the same as multiplying it by <code>y</code>.</p>
100 <div>
101 <p>Therefore copying the resulting block <code><var>N_OFFSPRING_EXPANDED</var></code> times is the same as:</p>
102 <p><code>\dfrac{1}{<var>D</var>} \cdot <var>N_OFFSPRING_EXPANDED</var> = \dfrac{<var>N_OFFSPRING_EXPANDED</var>}{<var>D</var>}</code></p>
103 </div>
104 <div>
105 <p>Notice that we end up with a block the same size as the goal block.</p>
106 <p><strong>Therefore the solution is to cut the starting block into <code><var>N_PARENT_EXPANDED</var></code> pieces and copy the resulting block <code><var>N_OFFSPRING_EXPANDED</var></code> times.</strong></p>
107 </div>
108 </div>
109 </div>
110 </div>
111 </div>
ebb3ac5d »
2011-09-29 Add fractions_cut_and_copy_1.html
112 </body>
113 </html>
Something went wrong with that request. Please try again.