-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfirstExample.tex
230 lines (192 loc) · 5.65 KB
/
firstExample.tex
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
\documentclass{ximera}
%% handout
%% space
%% newpage
%% numbers
%% nooutcomes
\input{preamble} %% we can turn off input when making a master document
\outcome{Understand a first example of the Ximera style.}
\outcome{Have a nice basic example to work from.}
\title{First example}
\begin{document}
\begin{abstract}
In this activity we see some examples.
\end{abstract}
\maketitle
To start we can have theorem environments:
\begin{theorem}
Given a right triangle drawn with TiKZ:
\begin{image}
\begin{tikzpicture}[geometryDiagrams]
\coordinate (A) at (0,2);
\coordinate (B) at (0,5);
\coordinate (C) at (6.5,2);
\tkzMarkRightAngle(C,A,B)
\tkzDefMidPoint(A,B) \tkzGetPoint{a}
\tkzDefMidPoint(A,C) \tkzGetPoint{b}
\tkzDefMidPoint(B,C) \tkzGetPoint{c}
\draw (A)--(B)--(C)--cycle;
\tkzLabelPoints[above](c)
\tkzLabelPoints[below](b)
\tkzLabelPoints[left](a)
\end{tikzpicture}
\end{image}
We have that:
\[
a^2 + b^2 = c^2
\]
\end{theorem}
As well as example environments.
\begin{example}
For example, this is an example.
\end{example}
There are exercises you can do:
\begin{exercise}
$3\times 2=\answer{6}$
\end{exercise}
Some exercises can have hints.
\begin{exercise}
Given that $r(v)=-2 v^2-4 v-4$, evaluate $r(-0.4)$. Express your answer in decimal notation.
%
\begin{hint}
$r(-0.4)=-2 (-0.4)^2-4 (-0.4)-4$.
\end{hint}
\begin{hint}
$r(-0.4)=-2.72$.
\end{hint}
The value of the function $r(v)=-2 v^2-4 v-4$, evaluated at $v=-0.4$, is $\answer{-2.72}$.
%
\end{exercise}
\begin{question}
What is the worst kind of cat?
\begin{prompt}
\begin{multipleChoice}
\choice{tabby}
\choice[correct]{puppy}
\choice{dog}
\choice{kitten}
\choice{main coon}
\end{multipleChoice}
\end{prompt}
\begin{hint}
It is not a cat or a type of cat.
\end{hint}
\begin{hint}
It is a puppy!
\end{hint}
\end{question}
%% It is also possible to have a list of questions which get shuffled:
%% \begin{shuffle}
\begin{question}
In the plot below, is $P$ a function of $k$?
\begin{image}
\begin{tikzpicture}
\begin{axis}[
ymin=-5,
ymax=5,
axis lines =center, xlabel=$k$, ylabel=$P$,
every axis y label/.style={at=(current axis.above origin),anchor=south},
every axis x label/.style={at=(current axis.right of origin),anchor=west},
domain=-5:5,
grid = major,
xtick={-4,...,4},
ytick={-4,...,4},
]
\addplot [very thick, smooth] {1 + (3.5 + x)*(-0.5714285714285714 + (-3.5 + x)*(0.16326530612244897 + (-0.3327149041434756 + (-0.20522334808049095 + 0.04019472590901159*(-3 + x))*(-2 + x))*x))};
\end{axis}
\end{tikzpicture}
\end{image}
\begin{multipleChoice}
\choice[correct]{Yes.}
\choice{No.}
\end{multipleChoice}
\begin{hint}
For each input, how many outputs are there?
\end{hint}
Use the plot to compute $P(2)$.
\begin{hint}
To start, find $2$ on the horizontal axis.
\end{hint}
\begin{hint}
Now from this position, move up or down until you reach the curve. The value of $P(2)$ is the height of the curve at the point $k=2$.
\end{hint}
The value of $P(2)$ is $\answer{2}$.
\end{question}
\begin{question}
In the plot below, is $R$ a function of $n$?
\begin{image}
\begin{tikzpicture}
\begin{axis}[
ymin=-5,
ymax=5,
axis lines =center, xlabel=$n$, ylabel=$R$,
every axis y label/.style={at=(current axis.above origin),anchor=south},
every axis x label/.style={at=(current axis.right of origin),anchor=west},
domain=-5:5,
grid = major,
xtick={-4,...,4},
ytick={-4,...,4},
]
\addplot [very thick, smooth] {4 + (-0.42857142857142855 + (-0.05952380952380952 + (0.09163059163059163 + (-0.041447441447441453 - 0.08955488955488956*(-3 + x))*(-2 + x))*(-0.5 + x))*(-3.5 + x))*(3.5 + x)};
\end{axis}
\end{tikzpicture}
\end{image}
\begin{multipleChoice}
\choice[correct]{Yes.}
\choice{No.}
\end{multipleChoice}
\begin{hint}
For each input, how many outputs are there?
\end{hint}
Use the plot to compute $R(3)$.
\begin{hint}
To start, find $3$ on the horizontal axis.
\end{hint}
\begin{hint}
Now from this position, move up or down until you reach the curve. The value of $R(3)$ is the height of the curve at the point $n=3$.
\end{hint}
The value of $R(3)$ is $\answer{1}$.
\end{question}
\begin{question}
In the plot below, is $b$ a function of $w$?
\begin{image}
\begin{tikzpicture}
\begin{axis}[
ymin=-5,
ymax=5,
axis lines =center, xlabel=$w$, ylabel=$b$,
every axis y label/.style={at=(current axis.above origin),anchor=south},
every axis x label/.style={at=(current axis.right of origin),anchor=west},
domain=-5:5,
grid = major,
xtick={-4,...,4},
ytick={-4,...,4},
]
\addplot [very thick, smooth] {2 + (3.5 + x)*(0.2857142857142857 + (-3.5 + x)*(0.489795918367347 + x*(0.34013605442176864 + (-0.5850340136054422 - 0.25117739403453676*(-0.5 + x))*(2 + x))))};
\end{axis}
\end{tikzpicture}
\end{image}
\begin{multipleChoice}
\choice[correct]{Yes.}
\choice{No.}
\end{multipleChoice}
\begin{hint}
For each input, how many outputs are there?
\end{hint}
Use the plot to compute $b(-2)$.
\begin{hint}
To start, find $-2$ on the horizontal axis.
\end{hint}
\begin{hint}
Now from this position, move up or down until you reach the curve. The value of $b(-2)$ is the height of the curve at the point $w=-2$.
\end{hint}
The value of $b(-2)$ is $\answer{4}$.
\end{question}
%% \end{shuffle}
%% \begin{question}
%% Enter the matrix \(\begin{bmatrix} x & y \\ xy & z+1 \end{bmatrix}\)
%% \begin{matrixAnswer}
%% correctMatrix = [['x','y'],['xy','z+1']]
%% \end{matrixAnswer}
%% \end{question}
\end{document}