This repository has been archived by the owner on May 11, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 863
/
exponent_rules.html
99 lines (87 loc) · 3.65 KB
/
exponent_rules.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
<!DOCTYPE html>
<html data-require="math expressions">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Exponent rules</title>
<script src="../khan-exercise.js"></script>
<style>
.sol input {
width: 25px !important;
}
</style>
</head>
<body>
<div class="exercise">
<div class="problems">
<div id="adding">
<div class="vars" data-ensure="EXP1 !== EXP2">
<var id="BASE">randRange(3, 9)</var>
<var id="EXP1">randRange(3, 12) * (rand(2) ? 1 : -1)</var>
<var id="EXP2">randRange(3, 12) * (rand(2) ? 1 : -1)</var>
</div>
<p class="question">What is <code><var>expr(["*", ["^", BASE, EXP1], ["^", BASE, EXP2]])</var></code>?</p>
<p class="solution" data-type="multiple">
<code><var>BASE</var></code> <span class="sol exp"><var>EXP1 + EXP2</var></span>
</p>
<div class="hints">
<p><code>
<var>expr(["*", ["^", BASE, EXP1], ["^", BASE, EXP2]])</var> = <var>expr(["^", BASE, ["+", EXP1, EXP2]])</var>
</code></p>
<p><code>
\hphantom{<var>expr(["*", ["^", BASE, EXP1], ["^", BASE, EXP2]])</var>} = <var>expr(["^", BASE, EXP1 + EXP2])</var>
</code></p>
</div>
</div>
<div id="subtracting" data-type="adding">
<p class="question">What is <code>\displaystyle <var>expr(["frac", ["^", BASE, EXP1], ["^", BASE, EXP2]])</var></code>?</p>
<p class="solution" data-type="multiple">
<code><var>BASE</var></code> <span class="sol exp"><var>EXP1 - EXP2</var></span>
</p>
<div class="hints">
<p><code>\displaystyle
<var>expr(["frac", ["^", BASE, EXP1], ["^", BASE, EXP2]])</var> = <var>expr(["^", BASE, ["-", EXP1, EXP2]])</var>
</code></p>
<p><code>\displaystyle
\hphantom{<var>expr(["frac", ["^", BASE, EXP1], ["^", BASE, EXP2]])</var>} = <var>expr(["^", BASE, EXP1 - EXP2])</var>
</code></p>
</div>
</div>
<div id="multiplying" data-type="adding">
<p class="question">What is <code><var>expr(["^", ["^", BASE, EXP1], EXP2])</var></code>?</p>
<p class="solution" data-type="multiple">
<code><var>BASE</var></code> <span class="sol exp"><var>EXP1 * EXP2</var></span>
</p>
<div class="hints">
<p><code>
<var>expr(["^", ["^", BASE, EXP1], EXP2])</var> = <var>expr(["^", BASE, ["*", EXP1, EXP2]])</var>
</code></p>
<p><code>
\hphantom{<var>expr(["^", ["^", BASE, EXP1], EXP2])</var>} = <var>expr(["^", BASE, EXP1 * EXP2])</var>
</code></p>
</div>
</div>
<div id="combined">
<div class="vars" data-ensure="getGCD(BASE1, BASE2) === 1">
<var id="BASE1">randRange(3, 9)</var>
<var id="BASE2">randRange(3, 9)</var>
<var id="EXP1">randRange(3, 12) * (rand(2) ? 1 : -1)</var>
<var id="EXP2">randRange(3, 12) * (rand(2) ? 1 : -1)</var>
<var id="EXP3">randRange(3, 12) * (rand(2) ? 1 : -1)</var>
</div>
<p class="question">What is <code><var>expr(["^", ["*", ["^", BASE1, EXP1], ["^", BASE2, EXP2]], EXP3])</var></code>?</p>
<p class="solution" data-type="multiple">
<code><var>BASE1</var></code> <span class="sol exp"><var>EXP1 * EXP3</var></span> · <code><var>BASE2</var></code> <span class="sol exp"><var>EXP2 * EXP3</var></span>
</p>
<div class="hints">
<p><code>
<var>expr(["^", ["*", ["^", BASE1, EXP1], ["^", BASE2, EXP2]], EXP3])</var> = <var>expr(["*", ["^", BASE1, ["*", EXP1, EXP3]], ["^", BASE2, ["*", EXP2, EXP3]]])</var>
</code></p>
<p><code>
\hphantom{<var>expr(["^", ["*", ["^", BASE1, EXP1], ["^", BASE2, EXP2]], EXP3])</var>} = <var>expr(["^", BASE1, EXP1*EXP3])</var> \cdot <var>expr(["^", BASE2, EXP2*EXP3])</var>
</code></p>
</div>
</div>
</div>
</div>
</body>
</html>