This repository has been archived by the owner on May 11, 2021. It is now read-only.
/
writing_expressions_1.html
67 lines (65 loc) · 2.94 KB
/
writing_expressions_1.html
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
<!DOCTYPE html>
<html data-require="math">
<head>
<title>Writing Expressions 1</title>
<script src="../khan-exercise.js"></script>
</head>
<body>
<div id="vars">
<var id="A">(random() > 0.5 ? -1 : 1) * (rand(9) + 1)</var>
<var id="B">(random() > 0.5 ? -1 : 1) * (rand(9) + 1)</var>
<var id="AP">A > 0 ? "+" : ""</var>
<var id="AN">A > 0 ? "" : "+"</var>
<var id="BP">B > 0 ? "+" : ""</var>
<var id="BN">B > 0 ? "" : "+"</var>
</div>
<div id="problems">
<div id="original" class="problem">
<div class="problem">
<p>Select the expression that matches the following phrase:</p>
</div>
<p class="question">The sum of <var>B</var> and the product of <var>A</var> and x.</p>
<p class="solution"><code><var>A</var>x <var>BP + B</var></code></p>
<ul class="choices" data-show="5" data-none="true">
<li><code><var>-1 * A</var>x <var>BP + B</var></code></li>
<li><code><var>A</var>x <var>BN + (-1 * B)</var></code></li>
<li><code><var>B</var>x <var>AP + A</var></code></li>
<li><code><var>-1 * B</var>x <var>AN + (-1 * A)</var></code></li>
</ul>
<div class="hint">
<p class="hint1">What is <span class="hint_orange">the product of <var>A</var> and x</span>?</p>
<p class="hint2">What is <span class="hint_blue">the sum of <var>B</var></span> and <code class="hint_orange"><var>A</var>x</code>?</p>
</div>
</div>
<div class="problem" data-type="original">
<p class="question">Take the quantity <var>A</var> times x, and then add <var>B</var>.</p>
<div class="hint">
<p class="hint1">What is <span class="hint_orange">the quantity of <var>A</var> times x</span>?</p>
<p class="hint2">What <span class="hint_blue">does adding <var>B</var></span> do?</p>
</div>
</div>
<div class="problem" data-type="original">
<p class="question"><var>B</var> plus the product of <var>A</var> and x.</p>
<div class="hint">
<p class="hint1">What is <span class="hint_orange">the product of <var>A</var> and x</span>?</p>
<p class="hint2">What is <span class="hint_blue"><var>B</var> plus</span> <code class="hint_orange"><var>A</var>x</code>?</p>
</div>
</div>
<div class="problem" data-type="original">
<p class="question">The sum of <var>B</var> and the quantity <var>A</var> times x.</p>
<div class="hint">
<p class="hint1">What is <span class="hint_orange">the quantity <var>A</var> times x</span>?</p>
<p class="hint2">What is <span class="hint_blue">the sum of <var>B</var></span> and <code class="hint_orange"><var>A</var>x</code>?</p>
</div>
</div>
</div>
<div id="hints">
<p>Let's break this problem into smaller and easier pieces.</p>
<p class="hint1"></p>
<p><code><var>A</var> * x = </code><code class="hint_orange"><var>A</var>x</code></p>
<p class="hint2"></p>
<p><code class="hint_orange"><var>A</var>x</code> <code class="hint_blue">+ <var>B</var></code></p>
<p>So, the original phrase can be written as <code><var>A</var>x + <var>B</var></code></p>
</div>
</body>
</html>