Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 98 lines (86 sloc) 6.388 kb
0e95f18 Marcia Lee Add new line for integration regex to grab header stuffs
marcia authored
1 <!DOCTYPE html>
2 <html data-require="math math-format graphie graphie-helpers word-problems slice-clone">
ebb3ac5 Julian Pulgarin Add fractions_cut_and_copy_1.html
jpulgarin authored
3 <head>
4e4cb9b Ben Eater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
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>
ebb3ac5 Julian Pulgarin Add fractions_cut_and_copy_1.html
jpulgarin authored
7 </head>
8 <body>
4e4cb9b Ben Eater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
9 <div class="exercise">
10 <div class="vars">
11 <!-- An integer will be a starting or ending quantity 1/3 of the time -->
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>
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">
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>
17 </div>
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>
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>
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>
26 </div>
ebb3ac5 Julian Pulgarin Add fractions_cut_and_copy_1.html
jpulgarin authored
27
4e4cb9b Ben Eater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
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>
ebb3ac5 Julian Pulgarin Add fractions_cut_and_copy_1.html
jpulgarin authored
31
4e4cb9b Ben Eater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
32 <p>Starting Block:</p>
ebb3ac5 Julian Pulgarin Add fractions_cut_and_copy_1.html
jpulgarin authored
33
4e4cb9b Ben Eater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
34 <div class="graphie" id="parent_block">
35 initSliceClone([ "current_block" ]);
36 init({ range: [ [ 0, 1 ], [ 0, 1 ] ],scale: [ 600, 25 ] });
37 rectchart( [ 1, 0 ], [ "#e00", "#999" ] );
38 </div>
ebb3ac5 Julian Pulgarin Add fractions_cut_and_copy_1.html
jpulgarin authored
39
4e4cb9b Ben Eater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
40 <p>Current Block:</p>
ebb3ac5 Julian Pulgarin Add fractions_cut_and_copy_1.html
jpulgarin authored
41
4e4cb9b Ben Eater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
42 <div class="graphie" id="current_block">
43 init({ range: [ [ 0, 1 ], [ 0, 1 ] ],scale: [ 600, 25 ] });
44 rectchart( [ 1, 0 ], [ "#e00", "#999" ] );
45 </div>
ebb3ac5 Julian Pulgarin Add fractions_cut_and_copy_1.html
jpulgarin authored
46
4e4cb9b Ben Eater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
47 <p>Goal Block:</p>
ebb3ac5 Julian Pulgarin Add fractions_cut_and_copy_1.html
jpulgarin authored
48
4e4cb9b Ben Eater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
49 <div class="graphie" id="goal_block">
50 init({ range: [ [ 0, 1 ], [ 0, 1 ] ],scale: [ 600 * ANSWER, 25 ] });
51 rectchart( [ 1, 0 ], [ BLUE, "#999" ] );
52 </div>
ebb3ac5 Julian Pulgarin Add fractions_cut_and_copy_1.html
jpulgarin authored
53
4e4cb9b Ben Eater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
54 <div class="solution" data-type="multiple">
55 <div style="margin-bottom: 10px;">
56 Cut into
57 <input type="button" value="-" class="simple-button action-gradient" onclick="KhanUtil.changePieces( false )">
58 <span id="pieces" style="display: inline-block; width: 54px; text-align: center;">1 piece</span>
59 <input type="button" value="+" class="simple-button action-gradient" onclick="KhanUtil.changePieces( true )">
60 </div>
ebb3ac5 Julian Pulgarin Add fractions_cut_and_copy_1.html
jpulgarin authored
61
4e4cb9b Ben Eater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
62 <div style="margin-bottom: 10px;">
63 <span style="display:inline-block; width: 42px;">Copy</span>
64 <input type="button" value="-" class="simple-button action-gradient" onclick="KhanUtil.changeTimes( false, 'current_block' )" disabled="disabled">
65 <span id="current_block_times" style="display: inline-block; width: 54px; text-align: center;">1 time</span>
66 <input type="button" value="+" class="simple-button action-gradient" onclick="KhanUtil.changeTimes( true, 'current_block' )">
67 </div>
ebb3ac5 Julian Pulgarin Add fractions_cut_and_copy_1.html
jpulgarin authored
68
4e4cb9b Ben Eater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
69 <span class="sol" id="current_block_answer" style="display: none;"><var>roundTo( 3, ANSWER )</var></span>
70 </div>
2773cd9 Julian Pulgarin Hints for fractions_cut_and_copy_1
jpulgarin authored
71
4e4cb9b Ben Eater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
72 <div class="hints">
73 <p data-if="CODE_PARENT !== fraction( N_PARENT, D)">The starting block of length <code><var>CODE_PARENT</var></code> units
74 can be rewritten as <code><var>fraction( N_PARENT_EXPANDED, D )</var></code>.</p>
75 <p data-if="CODE_OFFSPRING !== fraction( N_OFFSPRING, D)">The goal block of length <code><var>CODE_OFFSPRING</var></code> units
76 can be rewritten as <code><var>fraction( N_OFFSPRING_EXPANDED, D )</var></code>.</p>
77 <p>Cutting the starting block into <code>x</code> pieces is the same as dividing it by <code>x</code>.</p>
78 <div>
79 <p>Therefore cutting the starting block into <code><var>N_PARENT_EXPANDED</var></code> pieces is the same as:</p>
80 <p><code>\dfrac{<var>N_PARENT_EXPANDED</var>}{<var>D</var>} ÷ <var>N_PARENT_EXPANDED</var> =
81 \dfrac{<var>N_PARENT_EXPANDED</var>}{<var>D</var>} \cdot \dfrac{1}{<var>N_PARENT_EXPANDED</var>} = \dfrac{1}{<var>D</var>}</code></p>
82 </div>
83 <p>Copying the resulting block <code>y</code> times is the same as multiplying it by <code>y</code>.</p>
84 <div>
85 <p>Therefore copying the resulting block <code><var>N_OFFSPRING_EXPANDED</var></code> times is the same as:</p>
86 <p><code>\dfrac{1}{<var>D</var>} \cdot <var>N_OFFSPRING_EXPANDED</var> = \dfrac{<var>N_OFFSPRING_EXPANDED</var>}{<var>D</var>}</code></p>
87 </div>
88 <div>
89 <p>Notice that we end up with a block the same size as the goal block.</p>
90 <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>
91 </div>
92 </div>
93 </div>
94 </div>
95 </div>
ebb3ac5 Julian Pulgarin Add fractions_cut_and_copy_1.html
jpulgarin authored
96 </body>
97 </html>
Something went wrong with that request. Please try again.