Skip to content
This repository
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 120 lines (104 sloc) 9.242 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 106 107 108 109 110 111 112 113 114 115 116 117 118 119
<!DOCTYPE html>
<html data-require="math expressions">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Writing expressions 2</title>
    <script data-main="../local-only/main.js" src="../local-only/require.js"></script>
</head>
<body>

    <div class="exercise">
        <div class="vars">
            <var id="A">randRangeNonZero( -9, 9 )</var>
            <var id="B" data-ensure="abs( A ) !== abs( B )">randRangeNonZero( -9, 9 )</var>
            <var id="C" data-ensure="abs( C ) !== 1">randRangeNonZero( -9, 9 )</var>
            <var id="D">randRangeNonZero( -9, 9 )</var>
        </div> <!-- C ( Bx + A ) + D is the expression we are creating -->

        <div class="problems">
            <div id="original">
                <div class="problem">
                    <p>First consider the expression for:</p>
                </div>
                <p class="question">The sum of <code><var>A</var></code> and the product of <code><var>B</var></code> and <code>x</code>.</p>
                <p class="middle">Now select the answer that matches the following:</p>
                <p class="part-two"><b><code><var>D</var></code> plus the quantity of <code><var>C</var></code> times that expression</b></p>
                <p class="solution"><code><var>expr(["+",["*", C,["+",["*", B, "x"], A]], D])</var></code></p>
<!-- Solution: C ( A + Bx ) + D, wrong 1: -C SAME, wrong 2: -C (B + Ax) - D, wrong 3: D ( -A + Bx ) + C, wrong 4: D ( -B + Ax ) + C -->
                <ul class="choices" data-none="true" data-show="5">
                    <li><code><var>expr(["+",["*", -C,["+",["*", B, "x"], A]], D])</var></code></li>
                    <li><code><var>expr(["+",["*", -C,["+",["*", A, "x"], B]], D])</var></code></li>
                    <li><code><var>expr(["+",["*", D,["+",["*", B, "x"], -A]], C])</var></code></li>
                    <li><code><var>expr(["+",["*", D,["+",["*", A, "x"], -B]], C])</var></code></li>
                </ul>

                <div class="hints" data-apply="appendContents">
                    <p id="hint1">What is <span class="hint_orange">the product of <code><var>B</var></code> and <code>x</code></span>?</p>
                    <p id="hint2">What is <span class="hint_blue">the sum of <code><var>A</var></code></span> and <code class="hint_orange"><var>expr(["*", B, "x"])</var></code>?</p>
                    <p id="hint3">What is <span class="hint_orange">the quantity of <code><var>C</var></code> times that expression</span>?</p>
                    <p id="hint4">What is <span class="hint_blue"><code><var>D</var></code> plus</span> <code>\color{orange}{<var>expr(["*", C,["+",["*", B, "x"], A]])</var>}</code>?</p>
                </div>

            </div>
            <div id="type-2" data-type="original">
                <p class="question">the sum of <code><var>A</var></code> and the quantity of <code><var>B</var></code> times <code>x</code></p>
                <p class="part-two"><b><code><var>D</var></code> plus the product of <code><var>C</var></code> and that expression</b></p>

                <div class="hints" data-apply="appendContents">
                    <p id="hint1">What is <span class="hint_orange">the quantity of <code><var>B</var></code> times <code>x</code></span>?</p>
                    <p id="hint2">What is <span class="hint_blue">the sum of <code><var>A</var></code></span> and <code class="hint_orange"><var>expr(["*", B, "x"])</var></code>?</p>
                    <p id="hint3">What is <span class="hint_orange">the product of <code><var>C</var></code> times that expression</span>?</p>
                    <p id="hint4">What is <span class="hint_blue"><code><var>D</var></code> plus</span> <code>\color{orange}{<var>expr(["*", C,["+",["*", B, "x"], A]])</var>}</code>?</p>
                </div>

            </div>
            <div id="type-3" data-type="original">
                <p class="question"><code><var>A</var></code> plus the product of <code><var>B</var></code> and <code>x</code></p>
                <p class="part-two"><b>Take the quantity of <code><var>C</var></code> times that expression and then add <code><var>D</var></code>.</b></p>

                <div class="hints" data-apply="appendContents">
                    <p id="hint1">What is <span class="hint_orange">the product of <code><var>B</var></code> and <code>x</code></span>?</p>
                    <p id="hint2">What is <span class="hint_blue"><code><var>A</var></code> plus</span> <code class="hint_orange"><var>expr(["*", B, "x"])</var></code>?</p>
                    <p id="hint3">What is <span class="hint_orange">the quantity of <code><var>C</var></code> times that expression</span>?</p>
                    <p id="hint4">What does <span class="hint_blue">adding <code><var>D</var></code></span> to <code>\color{orange}{<var>expr(["*", C,["+",["*", B, "x"], A]])</var>}</code> do?</p>
                </div>

            </div>
            <div id="type-4" data-type="original">
                <p class="question"><code><var>A</var></code> plus the quantity of <code><var>B</var></code> times <code>x</code></p>
                <p class="part-two"><b>Take the product of <code><var>C</var></code> and that expression and then add <code><var>D</var></code>.</b></p>

                <div class="hints" data-apply="appendContents">
                    <p id="hint1">What is <span class="hint_orange">the quantity of <code><var>B</var></code> times <code>x</code></span>?</p>
                    <p id="hint2">What is <span class="hint_blue"><code><var>A</var></code> plus</span> <code class="hint_orange"><var>expr(["*", B, "x"])</var></code>?</p>
                    <p id="hint3">What is <span class="hint_orange">the product of <code><var>C</var></code> times that expression</span>?</p>
                    <p id="hint4">What does <span class="hint_blue">adding <code><var>D</var></code></span> to <code>\color{orange}{<var>expr(["*", C,["+",["*", B, "x"], A]])</var>}</code> do?</p>
                </div>

            </div>
            <div id="type-5" data-type="original">
                <p class="question">Take the product of <code><var>B</var></code> and <code>x</code> and add <code><var>A</var></code>.</p>
                <p class="part-two"><b>The sum of <code><var>D</var></code> and the product of <code><var>C</var></code> and that expression.</b></p>

                <div class="hints" data-apply="appendContents">
                    <p id="hint1">What is <span class="hint_orange">the product of <code><var>B</var></code> and <code>x</code></span>?</p>
                    <p id="hint2">What does <span class="hint_blue">adding <code><var>A</var></code></span> to <code class="hint_orange"><var>expr(["*", B, "x"])</var></code> do?</p>
                    <p id="hint3">What is <span class="hint_orange">the quantity of <code><var>C</var></code> times that expression</span>?</p>
                    <p id="hint4">What is <span class="hint_blue">the sum of <code><var>D</var></code> and </span><code>\color{orange}{<var>expr(["*", C,["+",["*", B, "x"], A]])</var>}</code>?</p>
                </div>

            </div>
            <div id="type-6" data-type="original">
                <p class="question">Take the quantity of <code><var>B</var></code> times <code>x</code> and add <code><var>A</var></code>.</p>
                <p class="part-two"><b>the sum of <code><var>D</var></code> and the product of <code><var>C</var></code> and that expression</b></p>

                <div class="hints" data-apply="appendContents">
                    <p id="hint1">What is <span class="hint_orange">the quantity of <code><var>B</var></code> times <code>x</code></span>?</p>
                    <p id="hint2">What does <span class="hint_blue">adding <code><var>A</var></code></span> to <code class="hint_orange"><var>expr(["*", B, "x"])</var></code> do?</p>
                    <p id="hint3">What is <span class="hint_orange">the product of <code><var>C</var></code> times that expression</span>?</p>
                    <p id="hint4">What is <span class="hint_blue">the sum of <code><var>D</var></code> and </span><code>\color{orange}{<var>expr(["*", C,["+",["*", B, "x"], A]])</var>}</code>?</p>
                </div>

            </div>
        </div>

        <div class="hints">
            <p>Let's break this problem into smaller and easier pieces.</p>
            <p id="hint1"></p>
            <p><code><var>B</var> \times x = \color{orange}{<var>expr(["*", B, "x"])</var>}</code></p>
            <p id="hint2"></p>
            <p><code class="hint_orange"><var>B</var>x</code><code class="hint_blue">{} + <var>A</var></code></p>
            <p id="hint3"></p>
            <p><code><var>C</var> \times (<var>B</var>x + <var>A</var>) = \color{orange}{<var>expr(["*", C,["+",["*", B, "x"], A]])</var>}</code></p>
            <p id="hint4"></p>
            <p><code class="hint_orange"><var>expr(["*", C,["+",["*", B, "x"], A]])</var></code><code class="hint_blue">{} + <var>D</var></code></p>
            <p>So the entire expression we're considering can be written as <code><var>expr(["+",["*", C,["+",["*", B, "x"], A]], D])</var></code>.</p>
        </div>
    </div>
</body>
</html>
Something went wrong with that request. Please try again.