Skip to content
This repository
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 106 lines (101 sloc) 6.823 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105
<!DOCTYPE html>
<html data-require="math word-problems">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Rate problems 1</title>
    <script src="../khan-exercise.js"></script>
</head>
<body>
    <div class="exercise">
        <div class="vars">
            <var id="VEHC1">vehicle(1)</var>
            <var id="VEHC2">vehicle(2)</var>

            <var id="REASONABLESPEED">
                function(vehicletype) {
                    if (vehicletype === "bike") {
                        return randRange(5, 15);
                    } else if (vehicletype ==="horse") {
                        return randRange(3, 30);
                    } else if (vehicletype ==="train") {
                        return randRange(30, 70);
                    } else {
                        return randRange(10, 65);
                    }
                }
            </var>

            <var id="SPEED1">REASONABLESPEED(VEHC1)</var>
            <var id="SPEED2" data-ensure="SPEED2 !== SPEED1">REASONABLESPEED(VEHC2)</var>
            <var id="AVG">SPEED1 &lt; SPEED2 ? randRange(SPEED1 + 1, SPEED2 - 1) : randRange(SPEED2 + 1, SPEED1 - 1)</var>
            <var id="TIME">randRange(1, 9)</var>
            <var id="DIST">AVG * TIME</var>
            <var id="DIST2">(SPEED1 * SPEED2 * TIME - DIST * SPEED2) / (SPEED1 - SPEED2)</var>
            <var id="DIST1">DIST - DIST2</var>
        </div>

        <div class="problems">
            <div id="original">
                <div class="problem">
                    <p><var>person(1)</var> traveled by <var>VEHC1</var> at an average speed of <var>SPEED1</var> miles per hour.</p>
                    <p>Then, <var>he(1)</var> traveled by <var>VEHC2</var> at an average speed of <var>SPEED2</var> miles per hour.</p>
                    <p>In total, <var>he(1)</var> traveled <var>DIST</var> miles for <var>plural(TIME, "hour")</var>.</p>
                </div>
                <p class="question">How many miles did <var>person(1)</var> travel by <var>VEHC1</var>? (Round to the nearest mile.)</p>
                <div class="solution" data-type="multiple">
                    <p><span class="sol" style="padding-right: 5px" data-forms="integer"><var>round(DIST1)</var></span> miles</p>
                </div>
                <div class="hints" data-apply="appendContents">
                    <p id="final-hint"><code>d_<var>vehicleVar(1)</var> = <var>round(DIST1)</var></code> miles</p>
                </div>
            </div>
            <div data-type="original">
                <p class="question">How many miles did <var>person(1)</var> travel by <var>vehicle(2)</var>? (Round to the nearest mile.)</p>
                <div class="solution" data-type="multiple">
                    <p><span class="sol" style="padding-right: 5px" data-forms="integer"><var>round(DIST2)</var></span> miles</p>
                </div>
                <div class="hints" data-apply="appendContents">
                    <p id="final-hint"><code>d_<var>vehicleVar(2)</var> = <var>round(DIST2)</var></code> miles</p>
                </div>
            </div>
            <div data-type="original">
                <p class="question">How many minutes did <var>person(1)</var> travel by <var>vehicle(1)</var>? (Round to the nearest minute.)</p>
                <div class="solution" data-type="multiple">
                    <p><span class="sol" style="padding-right: 5px" data-forms="integer"><var>round(DIST1 / SPEED1 * 60)</var></span> minutes</p>
                </div>
                <div class="hints" data-apply="appendContents">
                    <p id="final-hint"><code>t_<var>vehicleVar(1)</var> = <var>round(DIST1 / SPEED1 * 60)</var></code> minutes</p>
                </div>
            </div>
            <div data-type="original">
                <p class="question">How many minutes did <var>person(1)</var> travel by <var>vehicle(2)</var>? (Round to the nearest minute.)</p>
                <div class="solution" data-type="multiple">
                    <p><span class="sol" style="padding-right: 5px" data-forms="integer"><var>round(DIST2 / SPEED2 * 60)</var></span> minutes</p>
                </div>
                <div class="hints" data-apply="appendContents">
                    <p id="final-hint"><code>t_<var>vehicleVar(2)</var> = <var>round(DIST2 / SPEED2 * 60)</var></code> minutes</p>
                </div>
            </div>
        </div>

        <div class="hints">
            <p>Remember that <code>d = r * t</code>, or written another way, <code>t = d / r</code>.</p>
            <div>
                <p><code>d_<var>vehicleVar(1)</var> =</code> distance that <var>person(1)</var> traveled by <var>vehicle(1)</var></p>
                <p><code>d_<var>vehicleVar(2)</var> =</code> distance that <var>person(1)</var> traveled by <var>vehicle(2)</var></p>
                <p>Total distance: <code class="hint_orange">d_<var>vehicleVar(1)</var> + d_<var>vehicleVar(2)</var> = <var>DIST</var></code></p>
            </div>
            <p>Total time: <code class="hint_blue">t_<var>vehicleVar(1)</var> + t_<var>vehicleVar(2)</var> = <var>TIME</var></code></p>
            <p><code class="hint_blue">t_<var>vehicleVar(1)</var> = (d_<var>vehicleVar(1)</var> / <var>SPEED1</var>)</code> and
                <code class="hint_blue">t_<var>vehicleVar(2)</var> = (d_<var>vehicleVar(2)</var> / <var>SPEED2</var>)</code></p>
            <p>Substitute the blue equations for:
                <code>(d_<var>vehicleVar(1)</var> / <var>SPEED1</var>) + (d_<var>vehicleVar(2)</var> / <var>SPEED2</var>) = <var>TIME</var></code></p>
            <p>Multiply the above equation by <var>-1 * SPEED1</var>:
                <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>
            <p>Add the two orange equations for:
                <code>(<var>SPEED2 - SPEED1</var> / <var>SPEED2</var>) * d_<var>vehicleVar(2)</var> = <var>DIST - (SPEED1 * TIME)</var></code></p>
            <p>Calculating all variables (and then rounding to the nearest integer):<br>
                <code>d_<var>vehicleVar(2)</var> =</code> <var>roundTo( 4 , DIST2 )</var> <code>(<var>round(DIST2)</var>)</code> miles<br>
                <code>d_<var>vehicleVar(1)</var> =</code> <var>roundTo( 4 , DIST1 )</var> <code>(<var>round(DIST1)</var>)</code> miles<br>
                <code>t_<var>vehicleVar(1)</var> =</code> <var>roundTo( 4 , DIST1 / SPEED1 * 60 )</var> <code>(<var>round(DIST1 / SPEED1 * 60)</var>)</code> minutes<br>
                <code>t_<var>vehicleVar(2)</var> =</code> <var>roundTo( 4 , DIST2 / SPEED2 * 60 )</var> <code>(<var>round(DIST2 / SPEED2 * 60)</var>)</code> minutes</p>
        </div>
    </div>
</body>
</html>
Something went wrong with that request. Please try again.