Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 67 lines (64 sloc) 3.432 kB
d103285 @beneater Split measuring_segments into 4 exercises
beneater authored
1 <!DOCTYPE html>
cde9e9f @jeresig Re-run the exercises through the updated cleaner.
jeresig authored
2 <html data-require="math graphie expressions">
3 <head>
0f0c630 @cbhl Clean up the exercise files using the new cleaning utility. (II)
cbhl authored
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4e4cb9b @beneater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
5 <title>Measuring segments</title>
ac1415e @spicyj Use requirejs for module loading
spicyj authored
6 <script data-main="../local-only/main.js" src="../local-only/require.js"></script>
d103285 @beneater Split measuring_segments into 4 exercises
beneater authored
7 </head>
8 <body>
9 <div class="exercise">
4e4cb9b @beneater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
10 <div class="problems">
11 <div>
12 <div class="vars">
13 <var id="POINTS">sortNumbers( randRangeUnique( -5, 5, 4 ) )</var>
6479cec @petercollingridge Clarify question and remove orange colour
petercollingridge authored
14 <var id="COLORS">[ BLUE, GREEN, RED, PURPLE ]</var>
e673b69 @petercollingridge Fix to use new randRangeUnique
petercollingridge authored
15 <var id="IDX_1,IDX_2">randRangeUnique( 0, 3, 2 )</var>
4e4cb9b @beneater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
16 <var id="POINT_1">[ "A", "B", "C", "D" ][ IDX_1 ]</var>
17 <var id="POINT_2">[ "A", "B", "C", "D" ][ IDX_2 ]</var>
18 <var id="SEGMENT">POINT_1 + POINT_2</var>
19 <var id="SOLUTION">abs( POINTS[ IDX_1 ] - POINTS[ IDX_2 ] )</var>
20 </div>
6479cec @petercollingridge Clarify question and remove orange colour
petercollingridge authored
21 <p class="question">What is the length of <code>\overline{<var>SEGMENT</var>}</code>?</p>
29be961 @alopatin Rearrange answer area content within some exercises
alopatin authored
22 <p class="render-answer-area-here"></p>
4e4cb9b @beneater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
23 <div class="problem">
d53a57c @jeresig Two doctypes were being output. Only output one.
jeresig authored
24 <div class="graphie" id="number-line">
4e4cb9b @beneater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
25 init({
26 range: [ [ -6, 6 ], [ -1, 1 ] ]
27 });
28 style({ stroke: "#999" });
29 line( [ -5, 0 ], [ 5, 0 ] );
30 for ( var x = -5; x &lt;= 5; x++ ) {
31 line( [ x, -0.2 ], [ x, 0.2 ] );
32 label( [ x, -0.53 ], String( x ).replace( /-(\d)/g, "\\llap{-}$1" ), "center", { color: "#999" } );
33 }
34 style({ strokeWidth: 3.5 });
35 line( [ 0, -0.2], [0, 0.2]);
d103285 @beneater Split measuring_segments into 4 exercises
beneater authored
36
4e4cb9b @beneater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
37 style({ stroke: COLORS[ 0 ], fill: COLORS[ 0 ] });
38 circle( [ POINTS[ 0 ], 0 ], 0.10 );
39 style({ stroke: COLORS[ 1 ], fill: COLORS[ 1 ] });
40 circle( [ POINTS[ 1 ], 0 ], 0.10 );
41 style({ stroke: COLORS[ 2 ], fill: COLORS[ 2 ] });
42 circle( [ POINTS[ 2 ], 0 ], 0.10 );
43 style({ stroke: COLORS[ 3 ], fill: COLORS[ 3 ] });
44 circle( [ POINTS[ 3 ], 0 ], 0.10 );
45 label( [ POINTS[ 0 ], 0 ], "A", "above", { color: COLORS[ 0 ] } );
46 label( [ POINTS[ 1 ], 0 ], "B", "above", { color: COLORS[ 1 ] } );
47 label( [ POINTS[ 2 ], 0 ], "C", "above", { color: COLORS[ 2 ] } );
48 label( [ POINTS[ 3 ], 0 ], "D", "above", { color: COLORS[ 3 ] } );
49 </div>
50 </div>
0f0c630 @cbhl Clean up the exercise files using the new cleaning utility. (II)
cbhl authored
51 <div class="solution" data-forms="integer"><var>SOLUTION</var></div>
d103285 @beneater Split measuring_segments into 4 exercises
beneater authored
52
4e4cb9b @beneater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
53 <div class="hints">
54 <p>
55 <code><var>SEGMENT</var></code> means the distance from <code>\color{<var>COLORS[ IDX_1 ]</var>}{<var>POINT_1</var>}</code> to
56 <code>\color{<var>COLORS[ IDX_2 ]</var>}{<var>POINT_2</var>}</code>.
57 </p>
58 <p><code><var>SEGMENT</var> = |\color{<var>COLORS[ IDX_1 ]</var>}{<var>POINTS[ IDX_1 ]</var>} - \color{<var>COLORS[ IDX_2 ]</var>}{<var>POINTS[ IDX_2 ]</var>}|</code></p>
59 <p><code><var>SEGMENT</var> = |<var>POINTS[ IDX_1 ] - POINTS[ IDX_2 ]</var>|</code></p>
60 <p><code><var>SEGMENT</var> = <var>SOLUTION</var></code></p>
61 </div>
62 </div>
63 </div>
d103285 @beneater Split measuring_segments into 4 exercises
beneater authored
64 </div>
cde9e9f @jeresig Re-run the exercises through the updated cleaner.
jeresig authored
65 </body>
66 </html>
Something went wrong with that request. Please try again.