Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 106 lines (101 sloc) 5.788 kB
b40264c @jeresig Adding in my initial prototype.
jeresig authored
1 <!DOCTYPE html>
0de9dc8 @RAbraham removed graphie,kept data-forms="integer"
RAbraham authored
2 <html data-require="math word-problems">
b40264c @jeresig Adding in my initial prototype.
jeresig authored
3 <head>
65eec09 @spicyj Content-Type meta tag for libxml2 compatibility
spicyj authored
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
07d95d3 @spicyj Rename EVERYTHING; closes #323.
spicyj authored
5 <title>Rate problems 1</title>
7af06f8 @jeresig Move all exercise logic and file loading into JS file. Move exercises…
jeresig authored
6 <script src="../khan-exercise.js"></script>
b40264c @jeresig Adding in my initial prototype.
jeresig authored
7 </head>
8 <body>
190610b @jeresig Retool framework, move Math and Graph logic out of khan-exercise.js a…
jeresig authored
9 <div class="exercise">
10 <div class="vars">
670482f @Christi Updated vehicle speeds to be more realistic
Christi authored
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>
f065d79 @spicyj &lt;s and things
spicyj authored
30 <var id="AVG">SPEED1 &lt; SPEED2 ? randRange(SPEED1 + 1, SPEED2 - 1) : randRange(SPEED2 + 1, SPEED1 - 1)</var>
670482f @Christi Updated vehicle speeds to be more realistic
Christi authored
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
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>
7fab1d8 @spicyj Whitespace
spicyj authored
35 </div>
cf02179 @spicyj Strip trailing whitespace
spicyj authored
36
190610b @jeresig Retool framework, move Math and Graph logic out of khan-exercise.js a…
jeresig authored
37 <div class="problems">
38 <div id="original">
39 <div class="problem">
670482f @Christi Updated vehicle speeds to be more realistic
Christi authored
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
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
43 </div>
670482f @Christi Updated vehicle speeds to be more realistic
Christi authored
44 <p class="question">How many miles did <var>person(1)</var> travel by <var>VEHC1</var>? (Round to the nearest mile.)</p>
5b4e296 @Christi units, units, uuunits. units!
Christi authored
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>
a74d029 @spicyj Show final answer in rate problems 1 (fix #165)
spicyj authored
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>
190610b @jeresig Retool framework, move Math and Graph logic out of khan-exercise.js a…
jeresig authored
51 </div>
52 <div data-type="original">
1e052cf @spicyj Word problem helper library
spicyj authored
53 <p class="question">How many miles did <var>person(1)</var> travel by <var>vehicle(2)</var>? (Round to the nearest mile.)</p>
5b4e296 @Christi units, units, uuunits. units!
Christi authored
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>
a74d029 @spicyj Show final answer in rate problems 1 (fix #165)
spicyj authored
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>
190610b @jeresig Retool framework, move Math and Graph logic out of khan-exercise.js a…
jeresig authored
60 </div>
61 <div data-type="original">
1e052cf @spicyj Word problem helper library
spicyj authored
62 <p class="question">How many minutes did <var>person(1)</var> travel by <var>vehicle(1)</var>? (Round to the nearest minute.)</p>
5b4e296 @Christi units, units, uuunits. units!
Christi authored
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>
a74d029 @spicyj Show final answer in rate problems 1 (fix #165)
spicyj authored
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>
190610b @jeresig Retool framework, move Math and Graph logic out of khan-exercise.js a…
jeresig authored
69 </div>
70 <div data-type="original">
1e052cf @spicyj Word problem helper library
spicyj authored
71 <p class="question">How many minutes did <var>person(1)</var> travel by <var>vehicle(2)</var>? (Round to the nearest minute.)</p>
5b4e296 @Christi units, units, uuunits. units!
Christi authored
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>
a74d029 @spicyj Show final answer in rate problems 1 (fix #165)
spicyj authored
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>
b40264c @jeresig Adding in my initial prototype.
jeresig authored
78 </div>
79 </div>
cf02179 @spicyj Strip trailing whitespace
spicyj authored
80
190610b @jeresig Retool framework, move Math and Graph logic out of khan-exercise.js a…
jeresig authored
81 <div class="hints">
f1c3306 @spicyj Make MathJax pretty! (fix #212)
spicyj authored
82 <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
83 <div>
1e052cf @spicyj Word problem helper library
spicyj authored
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>
190610b @jeresig Retool framework, move Math and Graph logic out of khan-exercise.js a…
jeresig authored
87 </div>
1e052cf @spicyj Word problem helper library
spicyj authored
88 <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
89 <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
90 <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
91 <p>Substitute the blue equations for:
1e052cf @spicyj Word problem helper library
spicyj authored
92 <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
93 <p>Multiply the above equation by <var>-1 * SPEED1</var>:
1e052cf @spicyj Word problem helper library
spicyj authored
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>
190610b @jeresig Retool framework, move Math and Graph logic out of khan-exercise.js a…
jeresig authored
95 <p>Add the two orange equations for:
1e052cf @spicyj Word problem helper library
spicyj authored
96 <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
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>
b40264c @jeresig Adding in my initial prototype.
jeresig authored
102 </div>
103 </div>
104 </body>
f161590 @pappy74 added KhanUtil.plural
pappy74 authored
105 </html>
Something went wrong with that request. Please try again.