summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/mcexam/mcexam_example.tex
blob: dbd3e4866cc319cab0d01cba8209bd1294449912 (plain)
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
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
%%% Copyright (c) 2017 Jorre Vannieuwenhuyze.
%%%
%%% Permission is granted to copy, distribute and/or modify this
%%% software under the terms of the LaTeX Project Public License
%%% (LPPL), version 1.3c or any later version.
%%%
%%% This software is provided 'as is', without warranty of any kind,
%%% either expressed or implied, including, but not limited to, the
%%% implied warranties of merchantability and fitness for a
%%% particular purpose.


\documentclass[a4paper]{article}

\usepackage[output=concept
           ,numberofversions=4
           ,version=1
           ,seed=1
           ,randomizequestions=true
           ,randomizeanswers=true
           ,writeRfile=true
           ]{mcexam}
    
% Packages used for special things
\usepackage{tikz,framed} 

% Set headers and footers
\usepackage{fancyhdr,lastpage}
\pagestyle{fancy}
\fancyhf{}
\renewcommand{\headrulewidth}{0pt} 
\renewcommand{\footrulewidth}{1pt}
\lfoot{\mctheversion}
\rfoot{Page \thepage\ of \pageref{LastPage}}

% Ensure each question+answers is printed entirely on the same page.
\usepackage{calc}
\renewenvironment{setmcquestion}{\begin{minipage}[t]{\linewidth-\labelwidth}}{\end{minipage}\par}  
 
  

  


\begin{document}






\begin{center}
  \bfseries\LARGE Example Exam \texttt{mcexam} Package 
\end{center}

\begin{framed}
  \centering\bfseries\Large\MakeUppercase{\mctheversion}
\end{framed}

\mcifoutput{concept,exam}{ 

  \bigskip
  
  \noindent Name: \dotfill\\[.5\baselineskip]
  \noindent Student Number: \dotfill\\[.5\baselineskip]
  \noindent Program: \dotfill  
  
  \vspace{2\baselineskip}
  
  \noindent\textbf{Instructions:}
  \begin{itemize}[nosep]
   \item Answer all questions.
   \item Fill in the answers on the answer sheet.
  \end{itemize}  
  
  }
 



 
\begin{mcquestions}
        
        
       
\begin{mcquestioninstruction}
The next question is about the sky. 
\end{mcquestioninstruction}

\question What is the color of the sky?
         
          \begin{mcanswerslist}[fixlast]
          \answer[correct] blue
          \answer green
          \answer red
          \answer yellow
          \answer none of the above
          \end{mcanswerslist}        
          
          \begin{mcexplanation}
          If you look up to the sky and there are no clouds, you'll see it is blue.
          \end{mcexplanation}
                   
          \begin{mcnotes}
          This question had a large proportion of good answers last year.
          \end{mcnotes}
          
          
          
          
\question Which figure is a square?
          \begin{mcanswers}
          \begin{tabular}{@{}cccc}
          \answer{1}{\tikz{\draw (-0.66,0)--(0.66,0)--(0,1)--cycle;}}& 
          \answer{2}{\tikz{\draw (0,0)--(2,0)--(2,1)--(0,1)--cycle;}}& 
          \answer[correct]{3}{\tikz{\draw (0,0)--(1,0)--(1,1)--(0,1)--cycle;}}& 
          \answer{4}{\tikz{\draw (0,0) circle[radius=0.5];}}\\
          \answernum{1}&\answernum{2}&\answernum{3}&\answernum{4}\\
          \end{tabular} 
          \end{mcanswers}

          
          
  
          
\begin{mcquestioninstruction}
Questions \ref{ref1} to \ref{ref2} are about maths.
\end{mcquestioninstruction}

\question What is the value of $\pi$?\label{ref1}

         \begin{mcanswerslist}[{1,2,3,4},{2,3,4,1},{3,4,1,2}]
         \answer[correct] 3.14 
         \answer 2.19
         \answer a billion
         \answer 0
         \end{mcanswerslist}
         
         \begin{mcexplanation}
         $\pi$ is 3.14
         \end{mcexplanation}
    
\question[follow] How much is 2 + 2 ?

         \begin{mcanswerslist}[ordinal]
         \answer 3
         \answer[correct] 4 
         \answer 5
         \answer 6
         \answer 7
         \end{mcanswerslist}

         
\question[follow] The square root of 2 is \ldots\label{ref2}
         
         \begin{mcanswerslist}[fixlast]
         \answer 2.1 
         \answer[correct] smaller than 2 
         \answer larger than a billion
         \answer none of the above
         \end{mcanswerslist}
    
          
\question Which statement is correct?
          
          \begin{mcanswerslist}[{1,2,3,4},{2,1,4,3},{3,4,1,2},{4,3,2,1}]
          \answer The moon is a planet.
          \answer The moon is a star.
          \answer The sun is a planet.
          \answer[correct] The sun is a star.
          \end{mcanswerslist}

\question Which is the letter alpha?
 
          \begin{mcanswers}
          \begin{tabular}{cccc}
          \answer[correct]{1}{\Huge$\alpha$} & 
          \answer{2}{\Huge$\beta$}  & 
          \answer{3}{\Huge$\gamma$} & 
          \answer{4}{\Huge$\delta$} \\[0.1\baselineskip]
          \answernum{1}&\answernum{2}&\answernum{3}&\answernum{4}\\
          \end{tabular} 
          \end{mcanswers} 


 
 
 
\question What year did Albert Einstein die?

          \begin{mcanswerslist}[ordinal]
          \answer 1949
          \answer 1954
          \answer[correct] 1955
          \answer 1960         
          \end{mcanswerslist}



\question Which is the largest planet in the solar system?

          \begin{mcanswerslist}
          \answer[correct] Jupiter
          \answer Neptune
          \answer Earth
          \answer Mars
          \end{mcanswerslist}


\question What colour is Cerulean?

          \begin{mcanswerslist}
          \answer Red
          \answer[correct] Blue
          \answer Yellow
          \answer Green
          \end{mcanswerslist}
          
\question What are a group of Dolphins called?

          \begin{mcanswerslist}
          \answer School
          \answer Herd
          \answer[correct] Pod
          \answer Pool
          \end{mcanswerslist}

\question Who invented Penicillin?

          \begin{mcanswerslist}
          \answer[correct] Alexandra Fleming
          \answer Thomas Edison
          \answer Marie Curie
          \answer George Orwell
          \end{mcanswerslist}

\question What date was President John F Kennedy assassinated?

          \begin{mcanswerslist}[{1,2,3,4},{1,3,2,4},{4,3,2,1},{4,2,3,1}]
          \answer November 22 1962
          \answer November 24 1962
          \answer[correct] November 22 1963
          \answer November 24 1963
          
          \end{mcanswerslist}

\question How many men have walked on the moon?

          \begin{mcanswerslist}[ordinal]
          \answer 5
          \answer 9
          \answer 10
          \answer[correct] 12
          \end{mcanswerslist}

\question Who has won the most Academy Awards?

          \begin{mcanswerslist}
          \answer James Cameron
          \answer[correct] Walt Disney
          \answer Katherine Hepburn
          \answer Steven Spielberg
          \end{mcanswerslist}

\question What is the currency of Brazil?

          \begin{mcanswerslist}[{1,2,3,4},{2,1,3,4}]
          \answer Dollar
          \answer[correct] Real
          \answer Dollar \emph{and} Real
          \answer None of the above
          \end{mcanswerslist} 
 
 
 
 
 
\question Is this the last question? it is a very long question which spans several lines of the document.

          \begin{mcanswerslist}[permutenone]
          \answer[correct] yes
          \answer no
          \end{mcanswerslist}
          
          \begin{mcexplanation}
          It may not be the last question in your exam, but it is the question which was last programmed.
          \end{mcexplanation} 
 
 
\end{mcquestions}





\mcifoutput{concept,exam}{ 

  \vspace{2\baselineskip}
  
  \noindent\textbf{Instructions:}
  \begin{itemize}[nosep]
   \item You finished the exam!
   \item Hand in the answer sheet.
  \end{itemize}  
  
  }






 
 
 
\end{document}