Skip to content
Newer
Older
100644 98 lines (93 sloc) 5.21 KB
b40264c @jeresig Adding in my initial prototype.
jeresig authored May 9, 2011
1 <!DOCTYPE html>
0de9dc8 @RAbraham removed graphie,kept data-forms="integer"
RAbraham authored Dec 21, 2011
2 <html data-require="math word-problems">
b40264c @jeresig Adding in my initial prototype.
jeresig authored May 9, 2011
3 <head>
72418b8 @jeresig Add meta charset to all HTML pages.
jeresig authored Jul 28, 2011
4 <meta charset="UTF-8" />
07d95d3 @spicyj Rename EVERYTHING; closes #323.
spicyj authored Jul 22, 2011
5 <title>Rate problems 1</title>
7af06f8 @jeresig Move all exercise logic and file loading into JS file. Move exercises…
jeresig authored May 10, 2011
6 <script src="../khan-exercise.js"></script>
b40264c @jeresig Adding in my initial prototype.
jeresig authored May 9, 2011
7 </head>
8 <body>
190610b @jeresig Retool framework, move Math and Graph logic out of khan-exercise.js a…
jeresig authored May 18, 2011
9 <div class="exercise">
10 <div class="vars">
670482f @Christi Updated vehicle speeds to be more realistic
Christi authored Dec 31, 2011
11 <var id="VEHC1">vehicle(1)</var>
12 <var id="VEHC2">vehicle(2)</var>
13
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>
27
28 <var id="SPEED1">REASONABLESPEED(VEHC1)</var>
29 <var id="SPEED2" data-ensure="SPEED2 !== SPEED1">REASONABLESPEED(VEHC2)</var>
30 <var id="AVG">SPEED1 < SPEED2 ? randRange(SPEED1 + 1, SPEED2 - 1) : randRange(SPEED2 + 1, SPEED1 - 1)</var>
31 <var id="TIME">randRange(1, 9)</var>
190610b @jeresig Retool framework, move Math and Graph logic out of khan-exercise.js a…
jeresig authored May 18, 2011
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>
670482f @Christi Updated vehicle speeds to be more realistic
Christi authored Dec 31, 2011
35 </div>
cf02179 @spicyj Strip trailing whitespace
spicyj authored Jun 1, 2011
36
190610b @jeresig Retool framework, move Math and Graph logic out of khan-exercise.js a…
jeresig authored May 18, 2011
37 <div class="problems">
38 <div id="original">
39 <div class="problem">
670482f @Christi Updated vehicle speeds to be more realistic
Christi authored Dec 31, 2011
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>
1e052cf @spicyj Word problem helper library
spicyj authored May 25, 2011
42 <p>In total, <var>he(1)</var> traveled <var>DIST</var> miles for <var>plural(TIME, "hour")</var>.</p>
190610b @jeresig Retool framework, move Math and Graph logic out of khan-exercise.js a…
jeresig authored May 18, 2011
43 </div>
670482f @Christi Updated vehicle speeds to be more realistic
Christi authored Dec 31, 2011
44 <p class="question">How many miles did <var>person(1)</var> travel by <var>VEHC1</var>? (Round to the nearest mile.)</p>
2bf14d8 @RAbraham #7687 ( Acceptable answer format)
RAbraham authored Dec 20, 2011
45 <p class="solution" data-forms="integer"><var>round(DIST1)</var></p>
a74d029 @spicyj Show final answer in rate problems 1 (fix #165)
spicyj authored Jul 18, 2011
46 <div class="hints" data-apply="appendContents">
47 <p id="final-hint"><code>d_<var>vehicleVar(1)</var> = <var>round(DIST1)</var></code> miles</p>
48 </div>
190610b @jeresig Retool framework, move Math and Graph logic out of khan-exercise.js a…
jeresig authored May 18, 2011
49 </div>
50 <div data-type="original">
1e052cf @spicyj Word problem helper library
spicyj authored May 26, 2011
51 <p class="question">How many miles did <var>person(1)</var> travel by <var>vehicle(2)</var>? (Round to the nearest mile.)</p>
2bf14d8 @RAbraham #7687 ( Acceptable answer format)
RAbraham authored Dec 20, 2011
52 <p class="solution" data-forms="integer"><var>round(DIST2)</var></p>
a74d029 @spicyj Show final answer in rate problems 1 (fix #165)
spicyj authored Jul 19, 2011
53 <div class="hints" data-apply="appendContents">
54 <p id="final-hint"><code>d_<var>vehicleVar(2)</var> = <var>round(DIST2)</var></code> miles</p>
55 </div>
190610b @jeresig Retool framework, move Math and Graph logic out of khan-exercise.js a…
jeresig authored May 18, 2011
56 </div>
57 <div data-type="original">
1e052cf @spicyj Word problem helper library
spicyj authored May 26, 2011
58 <p class="question">How many minutes did <var>person(1)</var> travel by <var>vehicle(1)</var>? (Round to the nearest minute.)</p>
2bf14d8 @RAbraham #7687 ( Acceptable answer format)
RAbraham authored Dec 20, 2011
59 <p class="solution" data-forms="integer"><var>round(DIST1 / SPEED1 * 60)</var></p>
a74d029 @spicyj Show final answer in rate problems 1 (fix #165)
spicyj authored Jul 19, 2011
60 <div class="hints" data-apply="appendContents">
61 <p id="final-hint"><code>t_<var>vehicleVar(1)</var> = <var>round(DIST1 / SPEED1 * 60)</var></code> minutes</p>
62 </div>
190610b @jeresig Retool framework, move Math and Graph logic out of khan-exercise.js a…
jeresig authored May 18, 2011
63 </div>
64 <div data-type="original">
1e052cf @spicyj Word problem helper library
spicyj authored May 26, 2011
65 <p class="question">How many minutes did <var>person(1)</var> travel by <var>vehicle(2)</var>? (Round to the nearest minute.)</p>
2bf14d8 @RAbraham #7687 ( Acceptable answer format)
RAbraham authored Dec 20, 2011
66 <p class="solution" data-forms="integer"><var>round(DIST2 / SPEED2 * 60)</var></p>
a74d029 @spicyj Show final answer in rate problems 1 (fix #165)
spicyj authored Jul 19, 2011
67 <div class="hints" data-apply="appendContents">
68 <p id="final-hint"><code>t_<var>vehicleVar(2)</var> = <var>round(DIST2 / SPEED2 * 60)</var></code> minutes</p>
69 </div>
b40264c @jeresig Adding in my initial prototype.
jeresig authored May 9, 2011
70 </div>
71 </div>
cf02179 @spicyj Strip trailing whitespace
spicyj authored Jun 2, 2011
72
190610b @jeresig Retool framework, move Math and Graph logic out of khan-exercise.js a…
jeresig authored May 18, 2011
73 <div class="hints">
f1c3306 @spicyj Make MathJax pretty! (fix #212)
spicyj authored Jul 26, 2011
74 <p>Remember that <code>d = r * t</code>, or written another way, <code>t = d / r</code>.</p>
190610b @jeresig Retool framework, move Math and Graph logic out of khan-exercise.js a…
jeresig authored May 18, 2011
75 <div>
1e052cf @spicyj Word problem helper library
spicyj authored May 26, 2011
76 <p><code>d_<var>vehicleVar(1)</var> =</code> distance that <var>person(1)</var> traveled by <var>vehicle(1)</var></p>
77 <p><code>d_<var>vehicleVar(2)</var> =</code> distance that <var>person(1)</var> traveled by <var>vehicle(2)</var></p>
78 <p>Total distance: <code class="hint_orange">d_<var>vehicleVar(1)</var> + d_<var>vehicleVar(2)</var> = <var>DIST</var></code></p>
190610b @jeresig Retool framework, move Math and Graph logic out of khan-exercise.js a…
jeresig authored May 18, 2011
79 </div>
1e052cf @spicyj Word problem helper library
spicyj authored May 26, 2011
80 <p>Total time: <code class="hint_blue">t_<var>vehicleVar(1)</var> + t_<var>vehicleVar(2)</var> = <var>TIME</var></code></p>
cf02179 @spicyj Strip trailing whitespace
spicyj authored Jun 2, 2011
81 <p><code class="hint_blue">t_<var>vehicleVar(1)</var> = (d_<var>vehicleVar(1)</var> / <var>SPEED1</var>)</code> and
1e052cf @spicyj Word problem helper library
spicyj authored May 26, 2011
82 <code class="hint_blue">t_<var>vehicleVar(2)</var> = (d_<var>vehicleVar(2)</var> / <var>SPEED2</var>)</code></p>
190610b @jeresig Retool framework, move Math and Graph logic out of khan-exercise.js a…
jeresig authored May 18, 2011
83 <p>Substitute the blue equations for:
1e052cf @spicyj Word problem helper library
spicyj authored May 26, 2011
84 <code>(d_<var>vehicleVar(1)</var> / <var>SPEED1</var>) + (d_<var>vehicleVar(2)</var> / <var>SPEED2</var>) = <var>TIME</var></code></p>
190610b @jeresig Retool framework, move Math and Graph logic out of khan-exercise.js a…
jeresig authored May 18, 2011
85 <p>Multiply the above equation by <var>-1 * SPEED1</var>:
1e052cf @spicyj Word problem helper library
spicyj authored May 26, 2011
86 <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>
190610b @jeresig Retool framework, move Math and Graph logic out of khan-exercise.js a…
jeresig authored May 18, 2011
87 <p>Add the two orange equations for:
1e052cf @spicyj Word problem helper library
spicyj authored May 26, 2011
88 <code>(<var>SPEED2 - SPEED1</var> / <var>SPEED2</var>) * d_<var>vehicleVar(2)</var> = <var>DIST - (SPEED1 * TIME)</var></code></p>
dd5a142 @pkuperman Fix2504 by clarifying when rounding takes place
pkuperman authored Sep 12, 2011
89 <p>Calculating all variables (and then rounding to the nearest integer):<br>
90 <code>d_<var>vehicleVar(2)</var> =</code> <var>roundTo( 4 , DIST2 )</var> <code>(<var>round(DIST2)</var>)</code> miles<br>
91 <code>d_<var>vehicleVar(1)</var> =</code> <var>roundTo( 4 , DIST1 )</var> <code>(<var>round(DIST1)</var>)</code> miles<br>
92 <code>t_<var>vehicleVar(1)</var> =</code> <var>roundTo( 4 , DIST1 / SPEED1 * 60 )</var> <code>(<var>round(DIST1 / SPEED1 * 60)</var>)</code> minutes<br>
93 <code>t_<var>vehicleVar(2)</var> =</code> <var>roundTo( 4 , DIST2 / SPEED2 * 60 )</var> <code>(<var>round(DIST2 / SPEED2 * 60)</var>)</code> minutes</p>
b40264c @jeresig Adding in my initial prototype.
jeresig authored May 9, 2011
94 </div>
95 </div>
96 </body>
f161590 @pappy74 added KhanUtil.plural
pappy74 authored May 22, 2011
97 </html>
Something went wrong with that request. Please try again.