Skip to content
This repository
Newer
Older
100644 105 lines (101 sloc) 6.823 kb
b40264c4 » jeresig
2011-05-09 Adding in my initial prototype.
1 <!DOCTYPE html>
0de9dc80 » RAbraham
2011-12-21 removed graphie,kept data-forms="integer"
2 <html data-require="math word-problems">
b40264c4 » jeresig
2011-05-09 Adding in my initial prototype.
3 <head>
4e4cb9b1 » beneater
2012-04-10 lint: tabs->spaces and jQuery->$ for exercises
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>Rate problems 1</title>
6 <script src="../khan-exercise.js"></script>
b40264c4 » jeresig
2011-05-09 Adding in my initial prototype.
7 </head>
8 <body>
4e4cb9b1 » beneater
2012-04-10 lint: tabs->spaces and jQuery->$ for exercises
9 <div class="exercise">
10 <div class="vars">
11 <var id="VEHC1">vehicle(1)</var>
12 <var id="VEHC2">vehicle(2)</var>
670482f9 » Christi
2011-12-31 Updated vehicle speeds to be more realistic
13
4e4cb9b1 » beneater
2012-04-10 lint: tabs->spaces and jQuery->$ for exercises
14 <var id="REASONABLESPEED">
15 function(vehicletype) {
16 if (vehicletype === "bike") {
17 return randRange(5, 15);
18 } else if (vehicletype ==="horse") {
19 return randRange(3, 30);
20 } else if (vehicletype ==="train") {
21 return randRange(30, 70);
22 } else {
23 return randRange(10, 65);
24 }
25 }
26 </var>
670482f9 » Christi
2011-12-31 Updated vehicle speeds to be more realistic
27
4e4cb9b1 » beneater
2012-04-10 lint: tabs->spaces and jQuery->$ for exercises
28 <var id="SPEED1">REASONABLESPEED(VEHC1)</var>
29 <var id="SPEED2" data-ensure="SPEED2 !== SPEED1">REASONABLESPEED(VEHC2)</var>
30 <var id="AVG">SPEED1 &lt; SPEED2 ? randRange(SPEED1 + 1, SPEED2 - 1) : randRange(SPEED2 + 1, SPEED1 - 1)</var>
31 <var id="TIME">randRange(1, 9)</var>
32 <var id="DIST">AVG * TIME</var>
33 <var id="DIST2">(SPEED1 * SPEED2 * TIME - DIST * SPEED2) / (SPEED1 - SPEED2)</var>
34 <var id="DIST1">DIST - DIST2</var>
35 </div>
cf021797 » spicyj
2011-06-01 Strip trailing whitespace
36
4e4cb9b1 » beneater
2012-04-10 lint: tabs->spaces and jQuery->$ for exercises
37 <div class="problems">
38 <div id="original">
39 <div class="problem">
40 <p><var>person(1)</var> traveled by <var>VEHC1</var> at an average speed of <var>SPEED1</var> miles per hour.</p>
41 <p>Then, <var>he(1)</var> traveled by <var>VEHC2</var> at an average speed of <var>SPEED2</var> miles per hour.</p>
42 <p>In total, <var>he(1)</var> traveled <var>DIST</var> miles for <var>plural(TIME, "hour")</var>.</p>
43 </div>
44 <p class="question">How many miles did <var>person(1)</var> travel by <var>VEHC1</var>? (Round to the nearest mile.)</p>
45 <div class="solution" data-type="multiple">
46 <p><span class="sol" style="padding-right: 5px" data-forms="integer"><var>round(DIST1)</var></span> miles</p>
47 </div>
48 <div class="hints" data-apply="appendContents">
49 <p id="final-hint"><code>d_<var>vehicleVar(1)</var> = <var>round(DIST1)</var></code> miles</p>
50 </div>
51 </div>
52 <div data-type="original">
53 <p class="question">How many miles did <var>person(1)</var> travel by <var>vehicle(2)</var>? (Round to the nearest mile.)</p>
54 <div class="solution" data-type="multiple">
55 <p><span class="sol" style="padding-right: 5px" data-forms="integer"><var>round(DIST2)</var></span> miles</p>
56 </div>
57 <div class="hints" data-apply="appendContents">
58 <p id="final-hint"><code>d_<var>vehicleVar(2)</var> = <var>round(DIST2)</var></code> miles</p>
59 </div>
60 </div>
61 <div data-type="original">
62 <p class="question">How many minutes did <var>person(1)</var> travel by <var>vehicle(1)</var>? (Round to the nearest minute.)</p>
63 <div class="solution" data-type="multiple">
64 <p><span class="sol" style="padding-right: 5px" data-forms="integer"><var>round(DIST1 / SPEED1 * 60)</var></span> minutes</p>
65 </div>
66 <div class="hints" data-apply="appendContents">
67 <p id="final-hint"><code>t_<var>vehicleVar(1)</var> = <var>round(DIST1 / SPEED1 * 60)</var></code> minutes</p>
68 </div>
69 </div>
70 <div data-type="original">
71 <p class="question">How many minutes did <var>person(1)</var> travel by <var>vehicle(2)</var>? (Round to the nearest minute.)</p>
72 <div class="solution" data-type="multiple">
73 <p><span class="sol" style="padding-right: 5px" data-forms="integer"><var>round(DIST2 / SPEED2 * 60)</var></span> minutes</p>
74 </div>
75 <div class="hints" data-apply="appendContents">
76 <p id="final-hint"><code>t_<var>vehicleVar(2)</var> = <var>round(DIST2 / SPEED2 * 60)</var></code> minutes</p>
77 </div>
78 </div>
79 </div>
cf021797 » spicyj
2011-06-01 Strip trailing whitespace
80
4e4cb9b1 » beneater
2012-04-10 lint: tabs->spaces and jQuery->$ for exercises
81 <div class="hints">
82 <p>Remember that <code>d = r * t</code>, or written another way, <code>t = d / r</code>.</p>
83 <div>
84 <p><code>d_<var>vehicleVar(1)</var> =</code> distance that <var>person(1)</var> traveled by <var>vehicle(1)</var></p>
85 <p><code>d_<var>vehicleVar(2)</var> =</code> distance that <var>person(1)</var> traveled by <var>vehicle(2)</var></p>
86 <p>Total distance: <code class="hint_orange">d_<var>vehicleVar(1)</var> + d_<var>vehicleVar(2)</var> = <var>DIST</var></code></p>
87 </div>
88 <p>Total time: <code class="hint_blue">t_<var>vehicleVar(1)</var> + t_<var>vehicleVar(2)</var> = <var>TIME</var></code></p>
89 <p><code class="hint_blue">t_<var>vehicleVar(1)</var> = (d_<var>vehicleVar(1)</var> / <var>SPEED1</var>)</code> and
90 <code class="hint_blue">t_<var>vehicleVar(2)</var> = (d_<var>vehicleVar(2)</var> / <var>SPEED2</var>)</code></p>
91 <p>Substitute the blue equations for:
92 <code>(d_<var>vehicleVar(1)</var> / <var>SPEED1</var>) + (d_<var>vehicleVar(2)</var> / <var>SPEED2</var>) = <var>TIME</var></code></p>
93 <p>Multiply the above equation by <var>-1 * SPEED1</var>:
94 <code class="hint_orange">-d_<var>vehicleVar(1)</var> - (<var>SPEED1</var> / <var>SPEED2</var>) * d_<var>vehicleVar(2)</var> = <var>-SPEED1 * TIME</var></code></p>
95 <p>Add the two orange equations for:
96 <code>(<var>SPEED2 - SPEED1</var> / <var>SPEED2</var>) * d_<var>vehicleVar(2)</var> = <var>DIST - (SPEED1 * TIME)</var></code></p>
97 <p>Calculating all variables (and then rounding to the nearest integer):<br>
98 <code>d_<var>vehicleVar(2)</var> =</code> <var>roundTo( 4 , DIST2 )</var> <code>(<var>round(DIST2)</var>)</code> miles<br>
99 <code>d_<var>vehicleVar(1)</var> =</code> <var>roundTo( 4 , DIST1 )</var> <code>(<var>round(DIST1)</var>)</code> miles<br>
100 <code>t_<var>vehicleVar(1)</var> =</code> <var>roundTo( 4 , DIST1 / SPEED1 * 60 )</var> <code>(<var>round(DIST1 / SPEED1 * 60)</var>)</code> minutes<br>
101 <code>t_<var>vehicleVar(2)</var> =</code> <var>roundTo( 4 , DIST2 / SPEED2 * 60 )</var> <code>(<var>round(DIST2 / SPEED2 * 60)</var>)</code> minutes</p>
102 </div>
103 </div>
b40264c4 » jeresig
2011-05-09 Adding in my initial prototype.
104 </body>
f161590f » pappy74
2011-05-22 added KhanUtil.plural
105 </html>
Something went wrong with that request. Please try again.