This repository has been archived by the owner on May 11, 2021. It is now read-only.
/
writing_expressions_1.html
103 lines (103 loc) · 5.45 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
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
<!DOCTYPE html>
<html data-require="math math-format expressions">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Writing expressions</title>
<script data-main="../local-only/main.js" src="../local-only/require.js"></script>
</head>
<body>
<div class="exercise">
<div class="problems">
<div id="original">
<div class="vars">
<var id="M">randRange(1, 4)</var>
<var id="B">-randRange(1, 10)</var>
</div>
<div class="problem">
<p>Write an expression to represent:</p>
</div>
<p class="question">
<var>CardinalThrough20(-B)</var> less than the product of <var>cardinalThrough20(M)</var> and a number <code>x</code>.
</p>
<p class="solution" data-type="expression"><var>M</var> * x + <var>B</var></p>
<div class="hints">
<p>
The product of <var>cardinalThrough20(M)</var> and a number <code>x</code> can be written as
<span data-if="M !== 1"><code><var>M</var></code></span><code>x</code>.
</p>
<p><var>CardinalThrough20(-B)</var> less than something means that we subtract <code><var>-B</var></code> from it.</p>
<p>
If we subtract <code><var>-B</var></code> from <code><var>expr(["*", M, "x"])</var></code>, we have <code><var>expr(["+", ["*", M, "x"], B])</var></code>.
</p>
</div>
</div>
<div data-type="original">
<div class="vars">
<var id="M">randRange(1, 4)</var>
<var id="B">randRange(1, 10)</var>
</div>
<p class="question">
<var>CardinalThrough20(B)</var> more than the product of <var>cardinalThrough20(M)</var> and a number <code>x</code>.
</p>
<div class="hints">
<p>
The product of <var>cardinalThrough20(M)</var> and a number <code>x</code> can be written as
<span data-if="M !== 1"><code><var>M</var></code></span><code>x</code>.
</p>
<p><var>CardinalThrough20(B)</var> more than something means that we add <code><var>B</var></code> to it.</p>
<p>
If we add <code><var>B</var></code> to <code><var>expr(["*", M, "x"])</var></code>, we have <code><var>expr(["+", B, ["*", M, "x"]])</var></code>.
</p>
</div>
</div>
<div data-type="original">
<div class="vars">
<var id="M">-randRange(1, 4)</var>
<var id="B">randRange(1, 10)</var>
</div>
<p class="question">
<var>CardinalThrough20(B)</var> minus the product of <var>cardinalThrough20(-M)</var> and a number <code>x</code>.
</p>
<div class="hints">
<p>
The product of <var>cardinalThrough20(-M)</var> and a number <code>x</code> can be written as
<span data-if="-M !== 1"><code><var>-M</var></code></span><code>x</code>.
</p>
<p><var>CardinalThrough20(B)</var> minus something means that we subtract it from <code><var>B</var></code>.</p>
<p>
If we subtract <code><var>expr(["*", -M, "x"])</var></code> from <code><var>B</var></code>, we have <code><var>expr(["+", B, ["*", M, "x"]])</var></code>.
</p>
</div>
</div>
<div data-type="original">
<div class="vars">
<var id="M">randRange(2, 4)</var>
<var id="B">0</var>
</div>
<p class="question">The product of <var>cardinalThrough20(M)</var> and a number <code>x</code>.</p>
<div class="hints">
<p>"Product" means that we multiply <code><var>M</var></code> and <code>x</code>.</p>
<p>If we multiply <code><var>M</var></code> and <code>x</code>, we have <code><var>expr(["*", M, "x"])</var></code>.</p>
</div>
</div>
<div data-type="original">
<div class="vars">
<var id="M">randRange(1, 4)</var>
<var id="B">randRange(1, 10)</var>
</div>
<p class="question">
The sum of <var>cardinalThrough20(B)</var> and the product of <var>cardinalThrough20(M)</var> and a number <code>x</code>.
</p>
<div class="hints">
<p>
The product of <var>cardinalThrough20(M)</var> and a number <code>x</code> can be written as
<span data-if="M !== 1"><code><var>M</var></code></span><code>x</code>.
</p>
<p>"Sum" means that we add <code><var>B</var></code> and <code><var>expr(["*", M, "x"])</var></code>.</p>
<p>If we add <code><var>B</var></code> and <code><var>expr(["*", M, "x"])</var></code>, we have <code><var>expr(["+", B, ["*", M, "x"]])</var></code>.</p>
</div>
</div>
</div>
</div>
</body>
</html>