Debian Codegraph @

texmf-dist/doc/latex/webquiz/webquiz-online-manual.tex

raw
1 %-----------------------------------------------------------------------------
2 % Copyright (C) 2004-2019 Andrew Mathas, University of Sydney
3 %
4 % Distributed under the terms of the GNU General Public License (GPL)
5 % http://www.gnu.org/licenses/
6 %
7 % This file is part of the WebQuiz system.
8 %
9 % <[email protected]>
10 %-----------------------------------------------------------------------------
11
12 %% This file is part of the WebQuiz class distribution
13 \PassOptionsToClass{svgnames}{xcolor}
14 \documentclass[svgnames]{webquiz}
15
16 % load webquiz-doc code -- the class file loads webquiz-ini.code.tex is first
17 \input{webquiz-doc.code}
18
19 % using \textcolor or \color in \WebQuiz conflicts with the code to make
20 % listings respect color in webquiz.cfg
21 \newcommand\WebQuiz{WebQuiz\xspace}
22
23 \usepackage{pst-plot}
24 \usepackage{hyperref}
25
26 \usepackage{ifpdf}
27 \ifpdf
28 \PackageError{WebQuiz}{This file must be compiled using latex not pdflatex}
29 \fi
30 \newcommand{\C}{\mathbb C}
31 \newcommand*{\vect}[1]{\mathbf{#1}}
32
33 \hypersetup{pdftitle={WebQuiz online manual}}
34
35 \title{WebQuiz: Web Quizzes using LaTeX}
36 \begin{document}
37
38 \begin{discussion}[Introduction]
39 \WebQuiz is a \LaTeX{} package for creating \textit{interactive}
40 web quizzes. The idea is that you write the quiz using \LaTeX{} and that
41 \WebQuiz creates the web page from this file. Anything that you can
42 write using \LaTeX{} will be converted to \HTML by \WebQuiz. This
43 includes, for example, mathematics and graphics written using
44 \ctan{pstricks}. \WebQuiz supports three different types of quiz
45 questions:
46
47 \begin{enumerate}
48 \item Multiple choice questions with a \emph{unique} correct answer.
49 (See \qref{question1})
50 \item Multiple choice questions with \emph{several} (or no)
51 correct answers.
52 (See \qref{question2})
53 \item Questions that require the student to enter an answer, which
54 can then be compared with the correct answer in several different
55 ways. (See \qref{question3})
56 \end{enumerate}
57 The use of \WebQuiz is described in the next section. Later
58 sections describe how each of the \WebQuiz environments are used.
59
60 The \LatexCode|discussion| environment in \WebQuiz can also be used to
61 write Web Pages like this one (The pages you are reading here were
62 written using \WebQuiz.)
63 \end{discussion}
64 \begin{discussion}[Basic Usage]
65 Once you have a \WebQuiz file, you can run it through \LaTeX, in
66 the usual way, to produce a readable version of your quiz. When you
67 are happy with the quiz, use \WebQuiz to create the HTML
68 version. Note that the printable version of the quiz does \emph{not}
69 look like the web page; rather, it contains all of the information in
70 an easily readable layout.
71
72 If, for example, your quiz file is called \emph{quiz1.tex} then you
73 can use the following commands:
74 \begin{latexcode}
75 > latex quiz1 % latex a quiz file
76 > pdflatex quiz1 % a PDF versio of the quiz
77 > xdvi quiz1 % view the quiz using xdvi
78 > dvips quiz1 % print the quiz
79 > webquiz quiz1 % converts the quiz to html
80 \end{latexcode}
81 Converting the quiz to html can take quite a long time, particularly
82 if a large number of images need to be created.
83
84 \end{discussion}
85 \begin{discussion}[WebQuiz files]
86
87 The basic structure of a \WebQuiz file is as follows:
88 \begin{latexcode}
89 \documentclass{webquiz}
90
91 \title{Quiz 1: Complex numbers}
92
93 \UnitCode{MATH1001}
94 \UnitName{Differential Calculus}
95 \UnitURL{/u/UG/JM/MATH1001/}
96 \QuizzesURL{/u/UG/JM/MATH1001/Quizzes/}
97
98 \begin{document}
99
100 \begin{discussion}[short heading][optional heading]
101 . . . % optional discussion
102 \end{discussion}
103
104 \begin{question} % question 1
105 . . .
106 \end{question}
107
108 \begin{question} % question 2
109 . . .
110 \end{question}
111 .
112 .
113 \end{document}
114 \end{latexcode}
115 In the preamble of the \LaTeX{} file you can specify the unit code, the
116 name of the unit of study, the location of the homepage for the
117 unit and the index file for the quizzes for this unit; this is
118 done using the commands
119 \LatexCode|\UnitCode|,
120 \LatexCode|\UnitName|,
121 \LatexCode|\UnitURL| and
122 \LatexCode|\QuizzesURL| respectively. If the
123 command \LatexCode|\QuizzesURL| is omitted then the URL for the quiz
124 index file is set to \LatexCode|\UnitURL/|Quizzes.
125
126 The title of the quiz can be set in the preamble using the
127 \LatexCode|\title| command. Note that the \LatexCode|\title|
128 command \emph{must} appear before the \LatexCode|\begin{document}| command.
129 As in any \LaTeX{} document, the preamble can define macros and load
130 other \LaTeX{} packages the usual way .
131
132 By using the \LatexCode|discussion| environment you can summarise the
133 material for the students or add introductory material for the quiz.
134 For example, \LatexCode|discussion| environments can be used to recall
135 that main concepts being covered by the quiz or to give references to
136 the lecture notes for the unit. The syntax for the
137 \LatexCode|discussion| environment is as follows:
138 \begin{latexcode}
139 \begin{discussion}[optional short heading][optional heading]
140 . . .
141 \end{discussion}
142 \end{latexcode}
143 Anything you like (text, mathematics, \ldots) can go inside
144 discussion environments. The \emph{optional heading}, which defaults
145 to Discussion'', is used both as
146 the section heading on the web page and as the heading in the
147 side-menu on left hand side of the page. If a \textit{short heading}
148 is also given then it is used in the side-menu. The quiz can contain
149 zero or more discussion items ( and zero or more quiz questions).
150
151 Questions are set inside a \LatexCode|question| environment. The text is
152 followed by the answers.
153
154 \WebQuiz supports three types of questions:
155 \begin{itemize}
156 \item Multiple choice questions with \emph{precisely one} correct
157 answer;
158 \item Multiple choice questions with \emph{zero or more } correct
159 answers;
160 \item Questions that require the students to enter an answer. Five
161 difference comparison methods are available.
162 \end{itemize}
163 With each of these types of questions you can (and should) provide
164 feedback to the students depending on whether their answer is
165 correct or incorrect. Below we describe how to produce these
166 different types of questions.
167 \end{discussion}
168 \begin{discussion}[Question 1]
169 The syntax for a multiple choice question having \emph{precisely
170 one} correct answer is as follows:
171 \begin{latexcode}
172 \begin{question}
173 . . .question text
174 \begin{choice}
175 \(in)correct . . . text for (in)correct option
176 \feedback . . . feedback on response
177
178 \(in)correct . . . text for (in)correct option
179 \feedback . . . feedback on response
180 .
181 .
182 .
183 \end{choice}
184 \end{question}
185 \end{latexcode}
186 The different choices in a multiple choice question must be inside a
187 \LatexCode|choice| environment. This environment behaves like a
188 standard \LaTeX{} list environment except that instead of using
189 \LatexCode|\item| for list item you use:
190 \begin{itemize}
191 \item \LatexCode|\correct| for a correct choice
192 \item \LatexCode|\incorrect| for an incorrect choice
193 \item \LatexCode|\feedback| to give feedback to the student when
194 they select this choice
195 \end{itemize}
196 At most one \LatexCode|\feedback| response should be given for each
197 \LatexCode|\correct| and each \LatexCode|\incorrect| response.
198 The \LatexCode|\feedback| commands are optional; however, it is
199 recommended that you use them because targeted feedback to the
200 students based on their responses can be beneficial.
201 \par
202 For example, the code below, when run through \WebQuiz, produces \qref{question1}
203 in the online manual quiz.
204 \begin{latexcode}
205 \begin{question}
206 The shaded region in the graph
207 \begin{center}
208 \begin{pspicture}(-3,-1.5)(3,4)
209 \pscircle[linewidth=1pt,linestyle=dashed,%
210 fillcolor=SkyBlue,fillstyle=solid](1,1){2}
211 \psaxes[linecolor=red,linewidth=1pt,labels=none]%
212 {->}(0,0)(-1.5,-1.5)(3.5,3.5)
213 \rput(3.75,0){$x$}
214 \rput(0,3.85){$iy$}
215 \rput(3,-0.4){3}
216 \rput(-0.4,3){3$i$}
217 \psdots(1,1)
218 \end{pspicture}
219 \end{center}
220 is equal to which of the following sets of complex numbers?
221 \begin{choice}
222 \incorrect $\{z \in \C : (z-1)^{2}+(z-(i+1))^{2}<2\}$
223 \feedback The equation of a circle in the complex plane with
224 centre $a+ib$ and radius $r$ is
225 \begin{displaymath}
226 \{z\in\C : |z-(a+ib)|<r \}.
227 \end{displaymath}
228
229 \incorrect $\{z \in \C : z+(i+1)<2\}$
230 \feedback You want the set of points whose \textit{distance}
231 from $1+i$ is less than $2$.
232
233 \correct $\{z \in \C : |z-(i+1)|<2\}$
234 \feedback The graph shows the set of complex numbers whose
235 distance from $1+i$ is less than $2$.
236
237 \incorrect $\{z \in \C : |z-2|<|i+1-2|\}$
238 \feedback As $|i+1-2|=\sqrt 2$, this is the set of complex
239 numbers whose distance from $2$ is less than
240 $\sqrt 2$.
241
242 \incorrect None of the above.
243 \feedback The graph shows the set of complex numbers whose
244 distance from the centre of the circle is less than $2$.
245 \end{choice}
246 \end{question}
247 \end{latexcode}
248 \end{discussion}
249 \begin{discussion}[Question 2]
250 To allow multiple (or no) correct answer we add \LatexCode|multiple| as an
251 optional argument to the \LatexCode|choice| environment:
252 \begin{latexcode}
253 \begin{question}
254 . . .question text. . .
255 \begin{choice}[multiple]
256 \(in)correct . . . text for (in)correct option
257 \feedback . . . feedback on response
258
259 \(in)correct . . . text for (in)correct option
260 \feedback . . . feedback on response
261 .
262 .
263 .
264 \end{choice}
265 \end{question}
266 \end{latexcode}
267 The only difference to the previous case is that zero or more
268 \LatexCode|\correct| commands can appear.
269 \par
270 For example, \qref{question2} below was typed into \WebQuiz
271 using the following commands:
272 \begin{latexcode}
273 \begin{question}
274 Which of the following numbers are prime?
275 \begin{choice}[multiple]
276 \incorrect 1
277 \feedback By definition, a prime is a number greater than 1
278 whose only factors are 1 and itself.
279
280 \correct 19
281 \feedback The only factors of 19 are 1 and itself.
282
283 \incorrect 6
284 \feedback 2 is a factor of 6
285
286 \correct 23
287 \feedback The only factors of 23 are 1 and itself.
288
289 \correct 191
290 \feedback The only factors of 191 are 1 and itself.
291 \end{choice}
292 \end{question}
293 \end{latexcode}
294 \end{discussion}
295 \begin{discussion}[Question 3]
296
297 By default, the \LatexCode|choice| environments puts the multiple
298 choice options into one column format. Sometimes the options look
299 better when listed in two or more columns, however, this should be
300 used sparingly as multiple columns do not always display well if the
301 quiz is viewed on a mobile device. By using the \LatexCode|columns|
302 key word in a \LatexCode|choice| environment you can specify the
303 number of columns in the HTML version of the quiz.
304
305 \begin{latexcode}
306 \begin{question}
307 . . .question text. . .
308 \begin{choice}[multiple, columns=n] . . . n columns
309 \(in)correct . . . text for (in)correct option
310 \feedback . . . feedback on response
311
312 \(in)correct . . . text for (in)correct option
313 \feedback . . . feedback on response
314 .
315 .
316 .
317 \end{choice}
318 \end{question}
319 \end{latexcode}
320 If the optional argument \LatexCode|[multiple]| is not present, then the
321 question admits precisely one correct answer.
322 \par
323 For example, \qref{question3} below was typed into \WebQuiz
324 using the following commands:
325 \begin{latexcode}
326 \begin{question}
327 What are suitable parametric equations for this plane curve?
328 \begin{center}
329 \psset{unit=.6cm}
330 \begin{pspicture}(-2.5,-0.5)(5,5.5)
331 \psaxes[linecolor=red,linewidth=1pt,labels=none]%
332 {->}(0,0)(-2.5,-1.5)(5,5)
333 \psellipse[linecolor=SkyBlue,linewidth=2pt](1,2)(3,2)
334 \end{pspicture}
335 \end{center}
336
337 \begin{choice}[columns=1]
338 \incorrect $x=2\cos t + 1$, $y=3\sin t + 2$
339 \feedback This is an ellipse with centre $(1,2)$ and with axes of
340 length $4$ in the $x$-direction and $6$ in the $y$-direction.
341 \begin{center}
342 \psset{unit=.6cm}
343 \begin{pspicture}(-2.5,-0.5)(5,5.5)
344 \psaxes[linecolor=red,linewidth=1pt,labels=none]%
345 {->}(0,0)(-2.5,-1.5)(5,5)
346 \parametricplot[linecolor=SkyBlue,linewidth=2pt]{0}{360}%
347 {t cos 2 mul 1 add t sin 3 mul 2 add}
348 \end{pspicture}
349 \end{center}
350
351 \correct $x=3\cos t + 1$, $y=2\sin t + 2$
352 \feedback The curve is an ellipse centre (1,2) with axes length 6
353 in the $x$ direction and 4 in the $y$ direction.
354
355 \incorrect $x=3\cos t - 1$, $y=2\sin t - 2$
356 \feedback This is an ellipse with centre $(-1,-2)$ and with axes
357 of length $6$ in the $x$-direction and $4$ in the $y$-direction.
358 \begin{center}
359 \psset{unit=.6cm}
360 \begin{pspicture}(-5,-4)(1,2)
361 \psaxes[linecolor=red,linewidth=1pt,labels=none]%
362 {<-}(0,0)(-4.5,-5.5)(1,2)
363 \parametricplot[linecolor=SkyBlue,linewidth=2pt]{0}{360}%
364 {t cos 3 mul 1 sub t sin 2 mul 2 sub}
365 \end{pspicture}
366 \end{center}
367
368 \incorrect $x=2\cos t - 1$, $y=3\sin t - 2$
369 \feedback This is an ellipse with centre $(-1,-2)$ and with axes
370 of length $4$ in the $x$-direction and $6$ in the $y$-direction.
371 \begin{center}
372 \psset{unit=.6cm}
373 \begin{pspicture}(-4,-5)(1,2)
374 \psaxes[linecolor=red,linewidth=1pt,labels=none]%
375 {<-}(0,0)(-4.5,-5.5)(1,2)
376 \parametricplot[linecolor=SkyBlue,linewidth=2pt]{0}{360}%
377 { t cos 2 mul 1 sub t sin 3 mul 2 sub}
378 \end{pspicture}
379 \end{center}
380 \end{choice}
381 \end{question}
382 \end{latexcode}
383 \end{discussion}
384 \begin{discussion}[Question 4]
385 The final type of question that \WebQuiz supports is a question that
386 requires an answer, which can be a number or a string. The answer is
387 typeset using the \LatexCode|\answer| macro. The \LatexCode|\answer|
388 macro takes two arguments: an optional comparison method, which
389 defaults to \LatexCode|string|, and the correct answer for the
390 question:
391 \begin{latexcode}
392 \answer[comparison method]{correct answer}
393 \end{latexcode}
394 Feedback for correct and incorrect answers is given
395 using the macros \LatexCode|\whenRight| and \LatexCode|\whenWrong|,
396 respectively. The structure of questions with \LatexCode|\answer|'s is as follows:
397 \begin{latexcode}
398 \begin{question}
399 . . .question text. . .
400 \answer[*][complex|integer|lowercase|number|string]{actual answer}
401 \whenRight . . . feedback when right (optional)
402 \whenWrong . . . feedback when wrong (optional)
403 \end{question}
404 \end{latexcode}
405 See the \WebQuiz manual for details of the different
406 comparison types. For example, \qref{question4} below was typed into
407 \WebQuiz using the following commands:
408 \begin{latexcode}
409 \begin{question}
410 If the vectors $\vect{a}$ (of magnitude 8 units) and $\vect{b}$
411 (of magnitude 3 units) are perpendicular, what is the value
412 of
413 \begin{displaymath}
414 |\vect{a} -2\vect{b}|~?
415 \end{displaymath}
416 (Hint: Draw a diagram!)
417
418 \answer[number]{10}
419 \whenRight The vectors $\vect{a}$, \(-2\vect{b}\), and
420 $\vect{a} - 2\vect{b}$ form the sides of a right-angled
421 triangle, with sides of length $8$ and $6$ and
422 hypotenuse of length $|\vect{a} -2\vect{b}|$. Therefore
423 by Pythagoras' Theorem,
424 \(|\vect{a} -2\vect{b}|=\sqrt{8^2+6^2}=10\).
425
426 \whenWrong Draw a diagram and then use Pythagoras' theorem.
427 \end{question}
428 \end{latexcode}
429 \end{discussion}
430 \begin{discussion}[Index Files]
431 \WebQuiz also provides a mechanism for creating a web page
432 containing an index of all quizzes for a given Unit of Study.
433 This is done with a \WebQuiz file that contains a \LatexCode|quizindex|
434 environment. The syntax for this environment is as follows:
435 \begin{latexcode}
436 \begin{quizindex}
437 \quiz[url1]{title for quiz 1}
438 \quiz[url2]{title for quiz 2}
439 . . .
440 \end{quizindex}
441 \end{latexcode}
442 If no \textit{URL} is given as an optional argument to
443 \LatexCode|\quiz| then
444 \WebQuiz sets the url(s) to \BashCode|quiz1.html|, \BashCode|quiz2.html|
445 and so on.
446 \end{discussion}
447
448 \begin{discussion}[Credits]
449 \WebQuiz was written and developed in the
450 \href{http://www.maths.usyd.edu.au/}{School of Mathematics and
451 Statistics} at the \href{http://www.usyd.edu.au/}{University of
452 Sydney}. The system is built on \LaTeX{} with the conversion from
453 \LaTeX{} to HTML using Eitan Gurari's
454 \href{http://www.cis.ohio-state.edu/~gurari/TeX4ht/mn.html}{TeX4ht},
455 and Michal Hoftich's
456 \href{https://github.com/michal-h21/make4ht}{make4ht}.
457
458 To write quizzes using \WebQuiz it is only necessary to know
459 \LaTeX, however, the \WebQuiz system has three components:
460 \begin{itemize}
461 \item A \LaTeX{} document class file, \LatexCode{webquiz.cls}, and
462 a \TeXfht configuration file, \LatexCode{webquitexz.cfg}, that enable the
463 quiz files to be processed by \LaTeX{} and \TeXfht, respectively.
464 \item A python program, \BashCode{webquiz}, that translates the \XML
465 file that is produced by \TeXfht into \HTML.
466 \item Some \Javascript and \CSS that controls the quiz web page.
467 \end{itemize}
468
469 The \LaTeX{} component of \WebQuiz was written by Andrew Mathas and
470 the python, \CSS and \Javascript code was written by Andrew Mathas (and
471 Don Taylor), based on an initial prototype of Don Taylor's from 2001.
472 Since 2004 the program has been maintained and developed by Andrew
473 Mathas. Although the program has changed substantially since 2004,
474 Don's idea of using \TeXfht, and some of his code, is still in use.
475
476 Thanks are due to Bob Howlett for general help with CSS and, for
477 Version~5, to Michal Hoftich for technical advice.
478 \end{discussion}
479
480 \begin{question}
481 \label{question1}
482 The shaded region in the graph
483 \begin{center}
484 \begin{pspicture}(-3,-1.5)(3,4)
485 \pscircle[linewidth=1pt,linestyle=dashed,fillcolor=SkyBlue,fillstyle=solid](1,1){2}
486 \psaxes[linecolor=red,linewidth=1pt,labels=none]%
487 {->}(0,0)(-1.5,-1.5)(3.5,3.5)
488 \rput(3.75,0){$x$}
489 \rput(0,3.85){$iy$}
490 \rput(3,-0.4){3}
491 \rput(-0.4,3){3$i$}
492 \psdots(1,1)
493 \end{pspicture}
494 \end{center}
495 is equal to which of the following sets of complex numbers?
496 \begin{choice}
497 \incorrect $\{z \in \C : (z-1)^{2}+(z-(i+1))^{2}<2\}$
498 \feedback The equation of a circle in the complex plane with
499 centre $a+ib$ and radius $r$ is
500 \begin{displaymath}
501 \{z\in\C : |z-(a+ib)|<r \}.
502 \end{displaymath}
503
504 \incorrect $\{z \in \C : z+(i+1)<2\}$
505 \feedback You want the set of points whose \textit{distance}
506 from $1+i$ is less than $2$.
507
508 \correct $\{z \in \C : |z-(i+1)|<2\}$
509 \feedback The graph shows the set of complex numbers whose
510 distance from $1+i$ is less than $2$.
511
512 \incorrect $\{z \in \C : |z-2|<|i+1-2|\}$
513 \feedback As $|i+1-2|=\sqrt 2$, this is the set of complex
514 numbers whose distance from $2$ is less than
515 $\sqrt 2$.
516
517 \incorrect None of the above.
518 \feedback The graph shows the set of complex numbers whose
519 distance from the centre of the circle is less than $2$.
520 \end{choice}
521 \end{question}
522
523 \begin{question}
524 \label{question2}
525 Which of the following numbers are prime?
526 \begin{choice}[multiple]
527 \incorrect 1
528 \feedback By definition, a prime is a number greater than 1
529 whose only factors are 1 and itself.
530
531 \correct 19
532 \feedback The only factors of 19 are 1 and itself.
533
534 \incorrect 6
535 \feedback 2 is a factor of 6
536
537 \correct 23
538 \feedback The only factors of 23 are 1 and itself.
539
540 \correct 191
541 \feedback The only factors of 191 are 1 and itself.
542 \end{choice}
543 \end{question}
544
545 \begin{question}
546 \label{question3}
547 What are suitable parametric equations for this plane curve?
548 \begin{center}
549 \psset{unit=.6cm}
550 \begin{pspicture}(-2.5,-0.5)(5,5.5)
551 \psaxes[linecolor=red,linewidth=1pt,labels=none]%
552 {->}(0,0)(-2.5,-1.5)(5,5)
553 \psellipse[linecolor=SkyBlue,linewidth=2pt](1,2)(3,2)
554 \end{pspicture}
555 \end{center}
556
557 \begin{choice}[columns=1]
558 \incorrect $x=2\cos t + 1$, $y=3\sin t + 2$
559 \feedback This is an ellipse with centre $(1,2)$ and with axes of
560 length $4$ in the $x$-direction and $6$ in the $y$-direction.
561 \begin{center}
562 \psset{unit=.6cm}
563 \begin{pspicture}(-2.5,-0.5)(5,5.5)
564 \psaxes[linecolor=red,linewidth=1pt,labels=none]%
565 {->}(0,0)(-2.5,-1.5)(5,5)
566 \parametricplot[linecolor=SkyBlue,linewidth=2pt]{0}{360}%
567 {t cos 2 mul 1 add t sin 3 mul 2 add}
568 \end{pspicture}
569 \end{center}
570
571 \correct $x=3\cos t + 1$, $y=2\sin t + 2$
572 \feedback The curve is an ellipse centre (1,2) with axes length 6
573 in the $x$ direction and 4 in the $y$ direction.
574
575 \incorrect $x=3\cos t - 1$, $y=2\sin t - 2$
576 \feedback This is an ellipse with centre $(-1,-2)$ and with axes
577 of length $6$ in the $x$-direction and $4$ in the $y$-direction.
578 \begin{center}
579 \psset{unit=.6cm}
580 \begin{pspicture}(-5,-4)(1,2)
581 \psaxes[linecolor=red,linewidth=1pt,labels=none]%
582 {<-}(0,0)(-4.5,-5.5)(1,2)
583 \parametricplot[linecolor=SkyBlue,linewidth=2pt]{0}{360}%
584 {t cos 3 mul 1 sub t sin 2 mul 2 sub}
585 \end{pspicture}
586 \end{center}
587
588 \incorrect $x=2\cos t - 1$, $y=3\sin t - 2$
589 \feedback This is an ellipse with centre $(-1,-2)$ and with axes
590 of length $4$ in the $x$-direction and $6$ in the $y$-direction.
591 \begin{center}
592 \psset{unit=.6cm}
593 \begin{pspicture}(-4,-5)(1,2)
594 \psaxes[linecolor=red,linewidth=1pt,labels=none]%
595 {<-}(0,0)(-4.5,-5.5)(1,2)
596 \parametricplot[linecolor=SkyBlue,linewidth=2pt]{0}{360}%
597 { t cos 2 mul 1 sub t sin 3 mul 2 sub}
598 \end{pspicture}
599 \end{center}
600 \end{choice}
601 \end{question}
602
603 \begin{question}
604 \label{question4}
605 If the vectors $\vect{a}$ (of magnitude 8 units) and $\vect{b}$
606 (of magnitude 3 units) are perpendicular, what is the value
607 of
608 \(|\vect{a} -2\vect{b}|\)~?
609 (Hint: Draw a diagram!)
610
611 \answer[number]{10} units
612 \whenRight The vectors $\vect{a}$, \(-2\vect{b}\), and
613 $\vect{a} - 2\vect{b}$ form the sides of a right-angled
614 triangle, with sides of length $8$ and $6$ and
615 hypotenuse of length $|\vect{a} -2\vect{b}|$. Therefore
616 by Pythagoras' Theorem,
617 \(|\vect{a} -2\vect{b}|=\sqrt{8^2+6^2}=10\).
618
619 \whenWrong Draw a diagram and then use Pythagoras' theorem.
620 \end{question}
621 \end{document}
622 \endinput
623
624 %% End of file `webquiz-manual.tex'.