1 <?xml version="1.0" encoding="UTF-8"?>
4 <question type="category">
6 <text>$course$/Default for Scratch/input_samples</text>
11 <question type="stack">
13 <text>Algebraic input</text>
15 <questiontext format="html">
16 <text><![CDATA[<p>Type in {@ta@}.<br></p><p>[[input:ans1]]</p><div>[[validation:ans1]]</div>]]></text>
19 <defaultgrade>1.0000000</defaultgrade>
20 <penalty>0.1000000</penalty>
25 <specificfeedback format="html">
26 <text>[[feedback:prt1]]</text>
31 <questionsimplify>1</questionsimplify>
32 <assumepositive>0</assumepositive>
33 <assumereal>0</assumereal>
34 <prtcorrect format="html">
35 <text>Correct answer, well done.</text>
37 <prtpartiallycorrect format="html">
38 <text>Your answer is partially correct.</text>
39 </prtpartiallycorrect>
40 <prtincorrect format="html">
41 <text>Incorrect answer.</text>
43 <multiplicationsign>dot</multiplicationsign>
44 <sqrtsign>1</sqrtsign>
45 <complexno>i</complexno>
46 <inversetrig>cos-1</inversetrig>
47 <matrixparens>[</matrixparens>
48 <variantsselectionseed></variantsselectionseed>
51 <type>algebraic</type>
54 <strictsyntax>1</strictsyntax>
55 <insertstars>2</insertstars>
56 <syntaxhint></syntaxhint>
57 <syntaxattribute>0</syntaxattribute>
58 <forbidwords>solve</forbidwords>
59 <allowwords></allowwords>
60 <forbidfloat>1</forbidfloat>
61 <requirelowestterms>0</requirelowestterms>
62 <checkanswertype>1</checkanswertype>
63 <mustverify>1</mustverify>
64 <showvalidation>1</showvalidation>
69 <value>1.0000000</value>
70 <autosimplify>1</autosimplify>
76 <answertest>AlgEquiv</answertest>
79 <testoptions></testoptions>
81 <truescoremode>=</truescoremode>
82 <truescore>1.0000000</truescore>
83 <truepenalty></truepenalty>
84 <truenextnode>-1</truenextnode>
85 <trueanswernote>prt1-1-T</trueanswernote>
86 <truefeedback format="html">
89 <falsescoremode>=</falsescoremode>
90 <falsescore>0.0000000</falsescore>
91 <falsepenalty></falsepenalty>
92 <falsenextnode>-1</falsenextnode>
93 <falseanswernote>prt1-1-F</falseanswernote>
94 <falsefeedback format="html">
102 <question type="stack">
104 <text>Algebraic input (answer box sizes test)</text>
106 <questiontext format="html">
107 <text><![CDATA[<p>This question just tests answer boxes of multiple sizes.</p><p>[[input:ans1]] [[validation:ans1]]</p><p>[[input:ans2]] [[validation:ans2]]</p><p>[[input:ans3]] [[validation:ans3]]</p><p>[[input:ans4]] [[validation:ans4]]</p><p>[[input:ans5]] [[validation:ans5]]</p><p>[[input:ans7]] [[validation:ans7]]</p><p>[[input:ans10]] [[validation:ans10]]</p><p>[[input:ans15]] [[validation:ans15]]</p><p>[[input:ans20]] [[validation:ans20]]</p><p><br></p><p><br></p><p><br></p><p><br></p><p><br></p><p><br></p><p><br></p>]]></text>
109 <generalfeedback format="html">
112 <defaultgrade>1.0000000</defaultgrade>
113 <penalty>0.1000000</penalty>
118 <specificfeedback format="html">
119 <text>[[feedback:prt1]]</text>
124 <questionsimplify>1</questionsimplify>
125 <assumepositive>0</assumepositive>
126 <assumereal>0</assumereal>
127 <prtcorrect format="html">
128 <text>Correct answer, well done.</text>
130 <prtpartiallycorrect format="html">
131 <text>Your answer is partially correct.</text>
132 </prtpartiallycorrect>
133 <prtincorrect format="html">
134 <text>Incorrect answer.</text>
136 <multiplicationsign>dot</multiplicationsign>
137 <sqrtsign>1</sqrtsign>
138 <complexno>i</complexno>
139 <inversetrig>cos-1</inversetrig>
140 <matrixparens>[</matrixparens>
141 <variantsselectionseed></variantsselectionseed>
144 <type>algebraic</type>
147 <strictsyntax>1</strictsyntax>
148 <insertstars>0</insertstars>
149 <syntaxhint>2</syntaxhint>
150 <syntaxattribute>0</syntaxattribute>
151 <forbidwords></forbidwords>
152 <allowwords></allowwords>
153 <forbidfloat>1</forbidfloat>
154 <requirelowestterms>0</requirelowestterms>
155 <checkanswertype>0</checkanswertype>
156 <mustverify>1</mustverify>
157 <showvalidation>1</showvalidation>
162 <type>algebraic</type>
164 <boxsize>10</boxsize>
165 <strictsyntax>1</strictsyntax>
166 <insertstars>0</insertstars>
167 <syntaxhint>2222222222</syntaxhint>
168 <syntaxattribute>0</syntaxattribute>
169 <forbidwords></forbidwords>
170 <allowwords></allowwords>
171 <forbidfloat>1</forbidfloat>
172 <requirelowestterms>0</requirelowestterms>
173 <checkanswertype>0</checkanswertype>
174 <mustverify>1</mustverify>
175 <showvalidation>1</showvalidation>
180 <type>algebraic</type>
182 <boxsize>15</boxsize>
183 <strictsyntax>1</strictsyntax>
184 <insertstars>0</insertstars>
185 <syntaxhint>222222222222222</syntaxhint>
186 <syntaxattribute>0</syntaxattribute>
187 <forbidwords></forbidwords>
188 <allowwords></allowwords>
189 <forbidfloat>1</forbidfloat>
190 <requirelowestterms>0</requirelowestterms>
191 <checkanswertype>0</checkanswertype>
192 <mustverify>1</mustverify>
193 <showvalidation>1</showvalidation>
198 <type>algebraic</type>
201 <strictsyntax>1</strictsyntax>
202 <insertstars>0</insertstars>
203 <syntaxhint>22</syntaxhint>
204 <syntaxattribute>0</syntaxattribute>
205 <forbidwords></forbidwords>
206 <allowwords></allowwords>
207 <forbidfloat>1</forbidfloat>
208 <requirelowestterms>0</requirelowestterms>
209 <checkanswertype>0</checkanswertype>
210 <mustverify>1</mustverify>
211 <showvalidation>1</showvalidation>
216 <type>algebraic</type>
218 <boxsize>20</boxsize>
219 <strictsyntax>1</strictsyntax>
220 <insertstars>0</insertstars>
221 <syntaxhint>12345123451234512345</syntaxhint>
222 <syntaxattribute>0</syntaxattribute>
223 <forbidwords></forbidwords>
224 <allowwords></allowwords>
225 <forbidfloat>1</forbidfloat>
226 <requirelowestterms>0</requirelowestterms>
227 <checkanswertype>0</checkanswertype>
228 <mustverify>1</mustverify>
229 <showvalidation>1</showvalidation>
234 <type>algebraic</type>
237 <strictsyntax>1</strictsyntax>
238 <insertstars>0</insertstars>
239 <syntaxhint>222</syntaxhint>
240 <syntaxattribute>0</syntaxattribute>
241 <forbidwords></forbidwords>
242 <allowwords></allowwords>
243 <forbidfloat>1</forbidfloat>
244 <requirelowestterms>0</requirelowestterms>
245 <checkanswertype>0</checkanswertype>
246 <mustverify>1</mustverify>
247 <showvalidation>1</showvalidation>
252 <type>algebraic</type>
255 <strictsyntax>1</strictsyntax>
256 <insertstars>0</insertstars>
257 <syntaxhint>2222</syntaxhint>
258 <syntaxattribute>0</syntaxattribute>
259 <forbidwords></forbidwords>
260 <allowwords></allowwords>
261 <forbidfloat>1</forbidfloat>
262 <requirelowestterms>0</requirelowestterms>
263 <checkanswertype>0</checkanswertype>
264 <mustverify>1</mustverify>
265 <showvalidation>1</showvalidation>
270 <type>algebraic</type>
273 <strictsyntax>1</strictsyntax>
274 <insertstars>0</insertstars>
275 <syntaxhint>22222</syntaxhint>
276 <syntaxattribute>0</syntaxattribute>
277 <forbidwords></forbidwords>
278 <allowwords></allowwords>
279 <forbidfloat>1</forbidfloat>
280 <requirelowestterms>0</requirelowestterms>
281 <checkanswertype>0</checkanswertype>
282 <mustverify>1</mustverify>
283 <showvalidation>1</showvalidation>
288 <type>algebraic</type>
291 <strictsyntax>1</strictsyntax>
292 <insertstars>0</insertstars>
293 <syntaxhint>2222222</syntaxhint>
294 <syntaxattribute>0</syntaxattribute>
295 <forbidwords></forbidwords>
296 <allowwords></allowwords>
297 <forbidfloat>1</forbidfloat>
298 <requirelowestterms>0</requirelowestterms>
299 <checkanswertype>0</checkanswertype>
300 <mustverify>1</mustverify>
301 <showvalidation>1</showvalidation>
306 <value>1.0000000</value>
307 <autosimplify>1</autosimplify>
313 <answertest>AlgEquiv</answertest>
316 <testoptions></testoptions>
318 <truescoremode>=</truescoremode>
319 <truescore>1.0000000</truescore>
320 <truepenalty></truepenalty>
321 <truenextnode>-1</truenextnode>
322 <trueanswernote>prt1-1-T</trueanswernote>
323 <truefeedback format="html">
324 <text><![CDATA[<p>This just takes account of the first answer box!</p>]]></text>
326 <falsescoremode>=</falsescoremode>
327 <falsescore>0.0000000</falsescore>
328 <falsepenalty></falsepenalty>
329 <falsenextnode>-1</falsenextnode>
330 <falseanswernote>prt1-1-F</falseanswernote>
331 <falsefeedback format="html">
332 <text><![CDATA[<p>This just takes account of the first answer box!<br></p>]]></text>
339 <question type="stack">
341 <text>Checkbox</text>
343 <questiontext format="html">
344 <text><![CDATA[<p>Differentiate {@p@} with respect to \(x\).</p><p>[[input:ans1]]</p><div>[[validation:ans1]]</div>]]></text>
346 <generalfeedback format="html">
349 <defaultgrade>1.0000000</defaultgrade>
350 <penalty>0.1000000</penalty>
353 <text><![CDATA[/* Create a list of potential answers. */
355 ta:[[diff(p,x),true],[p,false],[int(p,x),false],[cos(2*x)+c,false]];
356 /* The actual correct answer. */
358 /* Add in a "None of these" to the end of the list. The Maxima value is the atom null. */
359 tao:[null, false, "None of these"];
360 ta:append(ta,[tao]);]]></text>
362 <specificfeedback format="html">
363 <text>[[feedback:prt1]]</text>
368 <questionsimplify>1</questionsimplify>
369 <assumepositive>0</assumepositive>
370 <assumereal>0</assumereal>
371 <prtcorrect format="html">
372 <text>Correct answer, well done.</text>
374 <prtpartiallycorrect format="html">
375 <text>Your answer is partially correct.</text>
376 </prtpartiallycorrect>
377 <prtincorrect format="html">
378 <text>Incorrect answer.</text>
380 <multiplicationsign>dot</multiplicationsign>
381 <sqrtsign>1</sqrtsign>
382 <complexno>i</complexno>
383 <inversetrig>cos-1</inversetrig>
384 <matrixparens>[</matrixparens>
385 <variantsselectionseed></variantsselectionseed>
388 <type>checkbox</type>
390 <boxsize>15</boxsize>
391 <strictsyntax>1</strictsyntax>
392 <insertstars>0</insertstars>
393 <syntaxhint></syntaxhint>
394 <syntaxattribute>0</syntaxattribute>
395 <forbidwords></forbidwords>
396 <allowwords></allowwords>
397 <forbidfloat>1</forbidfloat>
398 <requirelowestterms>0</requirelowestterms>
399 <checkanswertype>0</checkanswertype>
400 <mustverify>1</mustverify>
401 <showvalidation>2</showvalidation>
406 <value>1.0000000</value>
407 <autosimplify>1</autosimplify>
413 <answertest>Diff</answertest>
414 <sans>first(ans1)</sans>
415 <tans>diff(p,x)</tans>
416 <testoptions>x</testoptions>
418 <truescoremode>=</truescoremode>
419 <truescore>1.0000000</truescore>
420 <truepenalty></truepenalty>
421 <truenextnode>-1</truenextnode>
422 <trueanswernote>prt1-1-T</trueanswernote>
423 <truefeedback format="html">
426 <falsescoremode>=</falsescoremode>
427 <falsescore>0.0000000</falsescore>
428 <falsepenalty></falsepenalty>
429 <falsenextnode>-1</falsenextnode>
430 <falseanswernote>prt1-1-F</falseanswernote>
431 <falsefeedback format="html">
439 <question type="stack">
441 <text>Dropdown (shuffle)</text>
443 <questiontext format="html">
444 <text><![CDATA[<p>Differentiate {@p@} with respect to \(x\).</p><p>[[input:ans1]]</p><div>[[validation:ans1]]</div>]]></text>
446 <generalfeedback format="html">
449 <defaultgrade>1.0000000</defaultgrade>
450 <penalty>0.1000000</penalty>
453 <text><![CDATA[/* Create a list of potential answers. */
455 ta:[[diff(p,x),true],[p,false],[int(p,x),false],[cos(2*x)+c,false]];
456 /* The actual correct answer. */
458 /* Randomly shuffle the list "ta". */
459 ta:random_permutation(ta);
460 /* Add in a "None of these" to the end of the list. The Maxima value is the atom null. */
461 tao:[null, false, "None of these"];
462 ta:append(ta,[tao]);]]></text>
464 <specificfeedback format="html">
465 <text>[[feedback:prt1]]</text>
470 <questionsimplify>1</questionsimplify>
471 <assumepositive>0</assumepositive>
472 <assumereal>0</assumereal>
473 <prtcorrect format="html">
474 <text>Correct answer, well done.</text>
476 <prtpartiallycorrect format="html">
477 <text>Your answer is partially correct.</text>
478 </prtpartiallycorrect>
479 <prtincorrect format="html">
480 <text>Incorrect answer.</text>
482 <multiplicationsign>dot</multiplicationsign>
483 <sqrtsign>1</sqrtsign>
484 <complexno>i</complexno>
485 <inversetrig>cos-1</inversetrig>
486 <matrixparens>[</matrixparens>
487 <variantsselectionseed></variantsselectionseed>
490 <type>dropdown</type>
492 <boxsize>15</boxsize>
493 <strictsyntax>1</strictsyntax>
494 <insertstars>0</insertstars>
495 <syntaxhint></syntaxhint>
496 <syntaxattribute>0</syntaxattribute>
497 <forbidwords></forbidwords>
498 <allowwords></allowwords>
499 <forbidfloat>1</forbidfloat>
500 <requirelowestterms>0</requirelowestterms>
501 <checkanswertype>0</checkanswertype>
502 <mustverify>1</mustverify>
503 <showvalidation>2</showvalidation>
508 <value>1.0000000</value>
509 <autosimplify>1</autosimplify>
515 <answertest>Diff</answertest>
516 <sans>first(ans1)</sans>
517 <tans>diff(p,x)</tans>
518 <testoptions>x</testoptions>
520 <truescoremode>=</truescoremode>
521 <truescore>1.0000000</truescore>
522 <truepenalty></truepenalty>
523 <truenextnode>-1</truenextnode>
524 <trueanswernote>prt1-1-T</trueanswernote>
525 <truefeedback format="html">
528 <falsescoremode>=</falsescoremode>
529 <falsescore>0.0000000</falsescore>
530 <falsepenalty></falsepenalty>
531 <falsenextnode>-1</falsenextnode>
532 <falseanswernote>prt1-1-F</falseanswernote>
533 <falsefeedback format="html">
541 <question type="stack">
543 <text>Equiv input test</text>
545 <questiontext format="html">
546 <text><![CDATA[<p>Solve {@p@}.<br></p><p>[[input:ans1]]</p><div>[[validation:ans1]]</div>]]></text>
548 <generalfeedback format="html">
549 <text><![CDATA[<p>sangwinc<br></p>]]></text>
551 <defaultgrade>1.0000000</defaultgrade>
552 <penalty>0.1000000</penalty>
557 ta:[p,x=(4-7)/3,x=-1]</text>
559 <specificfeedback format="html">
560 <text>[[feedback:prt1]]</text>
565 <questionsimplify>1</questionsimplify>
566 <assumepositive>0</assumepositive>
567 <assumereal>0</assumereal>
568 <prtcorrect format="html">
569 <text>Correct answer, well done.</text>
571 <prtpartiallycorrect format="html">
572 <text>Your answer is partially correct.</text>
573 </prtpartiallycorrect>
574 <prtincorrect format="html">
575 <text>Incorrect answer.</text>
577 <multiplicationsign>dot</multiplicationsign>
578 <sqrtsign>1</sqrtsign>
579 <complexno>i</complexno>
580 <inversetrig>cos-1</inversetrig>
581 <matrixparens>[</matrixparens>
582 <variantsselectionseed></variantsselectionseed>
587 <boxsize>15</boxsize>
588 <strictsyntax>1</strictsyntax>
589 <insertstars>5</insertstars>
590 <syntaxhint>firstline</syntaxhint>
591 <syntaxattribute>0</syntaxattribute>
592 <forbidwords></forbidwords>
593 <allowwords></allowwords>
594 <forbidfloat>1</forbidfloat>
595 <requirelowestterms>0</requirelowestterms>
596 <checkanswertype>1</checkanswertype>
597 <mustverify>1</mustverify>
598 <showvalidation>1</showvalidation>
603 <value>1.0000000</value>
604 <autosimplify>1</autosimplify>
610 <answertest>AlgEquiv</answertest>
611 <sans>last(ans1)</sans>
612 <tans>last(ta)</tans>
613 <testoptions></testoptions>
615 <truescoremode>=</truescoremode>
616 <truescore>1.0000000</truescore>
617 <truepenalty></truepenalty>
618 <truenextnode>-1</truenextnode>
619 <trueanswernote>prt1-1-T</trueanswernote>
620 <truefeedback format="html">
623 <falsescoremode>=</falsescoremode>
624 <falsescore>0.0000000</falsescore>
625 <falsepenalty></falsepenalty>
626 <falsenextnode>-1</falsenextnode>
627 <falseanswernote>prt1-1-F</falseanswernote>
628 <falsefeedback format="html">
636 <question type="stack">
640 <questiontext format="html">
641 <text><![CDATA[<p>Type in {@M@}<br></p><p>[[input:ans1]]</p><div>[[validation:ans1]]</div>]]></text>
643 <generalfeedback format="html">
646 <defaultgrade>1.0000000</defaultgrade>
647 <penalty>0.1000000</penalty>
650 <text>M:matrix([1,2],[3,4])</text>
652 <specificfeedback format="html">
653 <text>[[feedback:prt1]]</text>
658 <questionsimplify>1</questionsimplify>
659 <assumepositive>0</assumepositive>
660 <assumereal>0</assumereal>
661 <prtcorrect format="html">
662 <text>Correct answer, well done.</text>
664 <prtpartiallycorrect format="html">
665 <text>Your answer is partially correct.</text>
666 </prtpartiallycorrect>
667 <prtincorrect format="html">
668 <text>Incorrect answer.</text>
670 <multiplicationsign>dot</multiplicationsign>
671 <sqrtsign>1</sqrtsign>
672 <complexno>i</complexno>
673 <inversetrig>cos-1</inversetrig>
674 <matrixparens>[</matrixparens>
675 <variantsselectionseed></variantsselectionseed>
680 <boxsize>15</boxsize>
681 <strictsyntax>1</strictsyntax>
682 <insertstars>0</insertstars>
683 <syntaxhint></syntaxhint>
684 <syntaxattribute>0</syntaxattribute>
685 <forbidwords></forbidwords>
686 <allowwords></allowwords>
687 <forbidfloat>1</forbidfloat>
688 <requirelowestterms>0</requirelowestterms>
689 <checkanswertype>1</checkanswertype>
690 <mustverify>1</mustverify>
691 <showvalidation>1</showvalidation>
696 <value>1.0000000</value>
697 <autosimplify>1</autosimplify>
703 <answertest>AlgEquiv</answertest>
706 <testoptions></testoptions>
708 <truescoremode>=</truescoremode>
709 <truescore>1.0000000</truescore>
710 <truepenalty></truepenalty>
711 <truenextnode>-1</truenextnode>
712 <trueanswernote>prt1-1-T</trueanswernote>
713 <truefeedback format="html">
716 <falsescoremode>=</falsescoremode>
717 <falsescore>0.0000000</falsescore>
718 <falsepenalty></falsepenalty>
719 <falsenextnode>-1</falsenextnode>
720 <falseanswernote>prt1-1-F</falseanswernote>
721 <falsefeedback format="html">
729 <question type="stack">
733 <questiontext format="html">
734 <text><![CDATA[<p>Show your working in this box! \(x\).<br></p><p>[[input:ans1]]</p><div>[[validation:ans1]]</div>]]></text>
736 <generalfeedback format="html">
739 <defaultgrade>1.0000000</defaultgrade>
740 <penalty>0.1000000</penalty>
745 <specificfeedback format="html">
746 <text>[[feedback:prt1]]</text>
751 <questionsimplify>1</questionsimplify>
752 <assumepositive>0</assumepositive>
753 <assumereal>0</assumereal>
754 <prtcorrect format="html">
755 <text>Correct answer, well done.</text>
757 <prtpartiallycorrect format="html">
758 <text>Your answer is partially correct.</text>
759 </prtpartiallycorrect>
760 <prtincorrect format="html">
761 <text>Incorrect answer.</text>
763 <multiplicationsign>dot</multiplicationsign>
764 <sqrtsign>1</sqrtsign>
765 <complexno>i</complexno>
766 <inversetrig>cos-1</inversetrig>
767 <matrixparens>[</matrixparens>
768 <variantsselectionseed></variantsselectionseed>
773 <boxsize>15</boxsize>
774 <strictsyntax>1</strictsyntax>
775 <insertstars>0</insertstars>
776 <syntaxhint></syntaxhint>
777 <syntaxattribute>0</syntaxattribute>
778 <forbidwords></forbidwords>
779 <allowwords></allowwords>
780 <forbidfloat>1</forbidfloat>
781 <requirelowestterms>0</requirelowestterms>
782 <checkanswertype>0</checkanswertype>
783 <mustverify>1</mustverify>
784 <showvalidation>1</showvalidation>
789 <value>1.0000000</value>
790 <autosimplify>1</autosimplify>
796 <answertest>AlgEquiv</answertest>
799 <testoptions></testoptions>
801 <truescoremode>=</truescoremode>
802 <truescore>1.0000000</truescore>
803 <truepenalty></truepenalty>
804 <truenextnode>-1</truenextnode>
805 <trueanswernote>prt1-1-T</trueanswernote>
806 <truefeedback format="html">
809 <falsescoremode>=</falsescoremode>
810 <falsescore>0.0000000</falsescore>
811 <falsepenalty></falsepenalty>
812 <falsenextnode>-1</falsenextnode>
813 <falseanswernote>prt1-1-F</falseanswernote>
814 <falsefeedback format="html">
822 <question type="stack">
826 <questiontext format="html">
827 <text><![CDATA[<p>Differentiate {@p@} with respect to \(x\).</p><p>[[input:ans1]]</p><div>[[validation:ans1]]</div>]]></text>
829 <generalfeedback format="html">
832 <defaultgrade>1.0000000</defaultgrade>
833 <penalty>0.1000000</penalty>
836 <text><![CDATA[/* Create a list of potential answers. */
838 ta:[[diff(p,x),true],[p,false],[int(p,x),false],[cos(2*x)+c,false]];
839 /* The actual correct answer. */
841 /* Add in a "None of these" to the end of the list. The Maxima value is the atom null. */
842 tao:[null, false, "None of these"];
843 ta:append(ta,[tao]);]]></text>
845 <specificfeedback format="html">
846 <text>[[feedback:prt1]]</text>
851 <questionsimplify>1</questionsimplify>
852 <assumepositive>0</assumepositive>
853 <assumereal>0</assumereal>
854 <prtcorrect format="html">
855 <text>Correct answer, well done.</text>
857 <prtpartiallycorrect format="html">
858 <text>Your answer is partially correct.</text>
859 </prtpartiallycorrect>
860 <prtincorrect format="html">
861 <text>Incorrect answer.</text>
863 <multiplicationsign>dot</multiplicationsign>
864 <sqrtsign>1</sqrtsign>
865 <complexno>i</complexno>
866 <inversetrig>cos-1</inversetrig>
867 <matrixparens>[</matrixparens>
868 <variantsselectionseed></variantsselectionseed>
873 <boxsize>15</boxsize>
874 <strictsyntax>1</strictsyntax>
875 <insertstars>0</insertstars>
876 <syntaxhint></syntaxhint>
877 <syntaxattribute>0</syntaxattribute>
878 <forbidwords></forbidwords>
879 <allowwords></allowwords>
880 <forbidfloat>1</forbidfloat>
881 <requirelowestterms>0</requirelowestterms>
882 <checkanswertype>0</checkanswertype>
883 <mustverify>1</mustverify>
884 <showvalidation>1</showvalidation>
889 <value>1.0000000</value>
890 <autosimplify>1</autosimplify>
896 <answertest>Diff</answertest>
897 <sans>first(ans1)</sans>
898 <tans>diff(p,x)</tans>
899 <testoptions>x</testoptions>
901 <truescoremode>=</truescoremode>
902 <truescore>1.0000000</truescore>
903 <truepenalty></truepenalty>
904 <truenextnode>-1</truenextnode>
905 <trueanswernote>prt1-1-T</trueanswernote>
906 <truefeedback format="html">
909 <falsescoremode>=</falsescoremode>
910 <falsescore>0.0000000</falsescore>
911 <falsepenalty></falsepenalty>
912 <falsenextnode>-1</falsenextnode>
913 <falseanswernote>prt1-1-F</falseanswernote>
914 <falsefeedback format="html">
922 <question type="stack">
924 <text>Single char</text>
926 <questiontext format="html">
927 <text><![CDATA[<p>Type in \(x\)<br></p><p>[[input:ans1]]</p><div>[[validation:ans1]]</div>]]></text>
929 <generalfeedback format="html">
932 <defaultgrade>1.0000000</defaultgrade>
933 <penalty>0.1000000</penalty>
938 <specificfeedback format="html">
939 <text>[[feedback:prt1]]</text>
944 <questionsimplify>1</questionsimplify>
945 <assumepositive>0</assumepositive>
946 <assumereal>0</assumereal>
947 <prtcorrect format="html">
948 <text>Correct answer, well done.</text>
950 <prtpartiallycorrect format="html">
951 <text>Your answer is partially correct.</text>
952 </prtpartiallycorrect>
953 <prtincorrect format="html">
954 <text>Incorrect answer.</text>
956 <multiplicationsign>dot</multiplicationsign>
957 <sqrtsign>1</sqrtsign>
958 <complexno>i</complexno>
959 <inversetrig>cos-1</inversetrig>
960 <matrixparens>[</matrixparens>
961 <variantsselectionseed></variantsselectionseed>
964 <type>singlechar</type>
966 <boxsize>15</boxsize>
967 <strictsyntax>1</strictsyntax>
968 <insertstars>0</insertstars>
969 <syntaxhint></syntaxhint>
970 <syntaxattribute>0</syntaxattribute>
971 <forbidwords></forbidwords>
972 <allowwords></allowwords>
973 <forbidfloat>1</forbidfloat>
974 <requirelowestterms>0</requirelowestterms>
975 <checkanswertype>0</checkanswertype>
976 <mustverify>1</mustverify>
977 <showvalidation>1</showvalidation>
982 <value>1.0000000</value>
983 <autosimplify>1</autosimplify>
989 <answertest>AlgEquiv</answertest>
992 <testoptions></testoptions>
994 <truescoremode>=</truescoremode>
995 <truescore>1.0000000</truescore>
996 <truepenalty></truepenalty>
997 <truenextnode>-1</truenextnode>
998 <trueanswernote>prt1-1-T</trueanswernote>
999 <truefeedback format="html">
1002 <falsescoremode>=</falsescoremode>
1003 <falsescore>0.0000000</falsescore>
1004 <falsepenalty></falsepenalty>
1005 <falsenextnode>-1</falsenextnode>
1006 <falseanswernote>prt1-1-F</falseanswernote>
1007 <falsefeedback format="html">
1014 <!-- question: 0 -->
1015 <question type="category">
1017 <text>$course$/Default for Scratch</text>
1022 <!-- question: 13 -->
1023 <question type="stack">
1025 <text>test_1_integration</text>
1027 <questiontext format="html">
1028 <text><![CDATA[<p>Find \[ \int {@p@} d{@v@}\] [[input:ans1]] [[validation:ans1]]</p>]]></text>
1030 <generalfeedback format="html">
1031 <text><![CDATA[<p>We can either do this question by inspection (i.e. spot the answer) or in a more formal manner by using the substitution \[ u = ({@v@}-{@a@}).\] Then, since \(\frac{d}{d{@v@}}u=1\) we have \[ \int {@p@} d{@v@} = \int u^{@n@} du = \frac{u^{@n+1@}}{@n+1@}+c = {@ta@}+c.\]</p>]]></text>
1033 <defaultgrade>1.0000000</defaultgrade>
1034 <penalty>0.1000000</penalty>
1041 ta:(v-a)^(n+1)/(n+1);</text>
1042 </questionvariables>
1043 <specificfeedback format="html">
1044 <text><![CDATA[<p>[[feedback:prt1]]</p>]]></text>
1047 <text>\(\int {@p@} d{@v@} = {@ta@}\)</text>
1049 <questionsimplify>1</questionsimplify>
1050 <assumepositive>0</assumepositive>
1051 <assumereal>0</assumereal>
1052 <prtcorrect format="html">
1053 <text><![CDATA[<p><span class="correct">Correct answer, well done.</span></p>]]></text>
1055 <prtpartiallycorrect format="html">
1056 <text><![CDATA[<p><span class="partially">Your answer is partially correct.</span></p>]]></text>
1057 </prtpartiallycorrect>
1058 <prtincorrect format="html">
1059 <text><![CDATA[<p><span class="incorrect">Incorrect answer.</span></p>]]></text>
1061 <multiplicationsign>dot</multiplicationsign>
1062 <sqrtsign>1</sqrtsign>
1063 <complexno>i</complexno>
1064 <inversetrig>cos-1</inversetrig>
1065 <matrixparens>[</matrixparens>
1066 <variantsselectionseed></variantsselectionseed>
1069 <type>algebraic</type>
1071 <boxsize>20</boxsize>
1072 <strictsyntax>1</strictsyntax>
1073 <insertstars>0</insertstars>
1074 <syntaxhint></syntaxhint>
1075 <syntaxattribute>0</syntaxattribute>
1076 <forbidwords>int</forbidwords>
1077 <allowwords></allowwords>
1078 <forbidfloat>1</forbidfloat>
1079 <requirelowestterms>1</requirelowestterms>
1080 <checkanswertype>1</checkanswertype>
1081 <mustverify>1</mustverify>
1082 <showvalidation>1</showvalidation>
1087 <value>1.0000000</value>
1088 <autosimplify>1</autosimplify>
1091 </feedbackvariables>
1094 <answertest>Int</answertest>
1097 <testoptions>v</testoptions>
1099 <truescoremode>=</truescoremode>
1100 <truescore>1.0000000</truescore>
1101 <truepenalty></truepenalty>
1102 <truenextnode>-1</truenextnode>
1103 <trueanswernote>1-0-T </trueanswernote>
1104 <truefeedback format="html">
1107 <falsescoremode>=</falsescoremode>
1108 <falsescore>0.0000000</falsescore>
1109 <falsepenalty></falsepenalty>
1110 <falsenextnode>-1</falsenextnode>
1111 <falseanswernote>1-0-F </falseanswernote>
1112 <falsefeedback format="html">
1117 <deployedseed>1</deployedseed>
1118 <deployedseed>1001758021</deployedseed>
1120 <testcase>1</testcase>
1127 <expectedscore>1.0000000</expectedscore>
1128 <expectedpenalty>0.0000000</expectedpenalty>
1129 <expectedanswernote>1-0-T</expectedanswernote>
1133 <testcase>2</testcase>
1140 <expectedscore>0.0000000</expectedscore>
1141 <expectedpenalty>0.1000000</expectedpenalty>
1142 <expectedanswernote>1-0-F</expectedanswernote>
1146 <testcase>3</testcase>
1149 <value>n*(v-a)^(n-1)</value>
1153 <expectedscore>0.0000000</expectedscore>
1154 <expectedpenalty>0.1000000</expectedpenalty>
1155 <expectedanswernote>1-0-F</expectedanswernote>
1159 <testcase>4</testcase>
1162 <value>(v-a)^(n+1)</value>
1166 <expectedscore>0.0000000</expectedscore>
1167 <expectedpenalty>0.1000000</expectedpenalty>
1168 <expectedanswernote>1-0-F</expectedanswernote>
1173 <!-- question: 14 -->
1174 <question type="stack">
1176 <text>test_2_rectangle</text>
1178 <questiontext format="html">
1179 <text><![CDATA[<p>A rectangle has length {@sg@}cm greater than its width. If it has an area of \({@abs(ar)@}cm^2\), find the dimensions of the rectangle.</p>
1180 <p>1. Write down an equation which relates the side lengths to the area of the rectangle. <br />[[input:ans1]] [[validation:ans1]] [[feedback:eq]]</p>
1181 <p>2. Solve your equation. Enter your answer as a set of numbers. <br /> [[input:ans2]] [[validation:ans2]] [[feedback:sol]]</p>
1182 <p>3. Hence, find the length of the shorter side. <br />[[input:ans3]] cm [[validation:ans3]] [[feedback:short]]</p>]]></text>
1184 <generalfeedback format="html">
1185 <text><![CDATA[<p>If \(x\)cm is the width then \((x+{@sg@})\) is the length. Now the area is \({@abs(ar)@}cm^2\) and so \[ {@x*(x+sg)=-ar@}.\] \[ {@x^2+sg*x+ar@}=0\] \[ {@(x+rp)*(x+rn)=0@} \] So that \(x={@-rp@}\) or \(x={@-rn@}\). Since lengths are positive quantities \(x>0\) and we discard the negative root. Hence the length of the shorter side is \(x={@-rn@}\)cm.</p>]]></text>
1187 <defaultgrade>1.0000000</defaultgrade>
1188 <penalty>0.1000000</penalty>
1191 <text>rn:-1*(rand(4)+2);
1197 tas1:setify(map(rhs,solve(ta1,x)));
1198 tas2:setify(map(rhs,solve(ta2,x)));</text>
1199 </questionvariables>
1200 <specificfeedback format="html">
1204 <text>{@ta1@}, {@tas1@}.</text>
1206 <questionsimplify>1</questionsimplify>
1207 <assumepositive>0</assumepositive>
1208 <assumereal>0</assumereal>
1209 <prtcorrect format="html">
1210 <text><![CDATA[<p><span class="correct">Correct answer, well done.</span></p>]]></text>
1212 <prtpartiallycorrect format="html">
1213 <text><![CDATA[<p><span class="partially">Your answer is partially correct.</span></p>]]></text>
1214 </prtpartiallycorrect>
1215 <prtincorrect format="html">
1216 <text><![CDATA[<p><span class="incorrect">Incorrect answer.</span></p>]]></text>
1218 <multiplicationsign>dot</multiplicationsign>
1219 <sqrtsign>1</sqrtsign>
1220 <complexno>i</complexno>
1221 <inversetrig>cos-1</inversetrig>
1222 <matrixparens>[</matrixparens>
1223 <variantsselectionseed></variantsselectionseed>
1226 <type>algebraic</type>
1228 <boxsize>15</boxsize>
1229 <strictsyntax>1</strictsyntax>
1230 <insertstars>1</insertstars>
1231 <syntaxhint></syntaxhint>
1232 <syntaxattribute>0</syntaxattribute>
1233 <forbidwords></forbidwords>
1234 <allowwords></allowwords>
1235 <forbidfloat>1</forbidfloat>
1236 <requirelowestterms>1</requirelowestterms>
1237 <checkanswertype>1</checkanswertype>
1238 <mustverify>1</mustverify>
1239 <showvalidation>1</showvalidation>
1244 <type>algebraic</type>
1246 <boxsize>15</boxsize>
1247 <strictsyntax>1</strictsyntax>
1248 <insertstars>1</insertstars>
1249 <syntaxhint></syntaxhint>
1250 <syntaxattribute>0</syntaxattribute>
1251 <forbidwords></forbidwords>
1252 <allowwords></allowwords>
1253 <forbidfloat>1</forbidfloat>
1254 <requirelowestterms>1</requirelowestterms>
1255 <checkanswertype>1</checkanswertype>
1256 <mustverify>1</mustverify>
1257 <showvalidation>1</showvalidation>
1262 <type>algebraic</type>
1264 <boxsize>5</boxsize>
1265 <strictsyntax>1</strictsyntax>
1266 <insertstars>1</insertstars>
1267 <syntaxhint></syntaxhint>
1268 <syntaxattribute>0</syntaxattribute>
1269 <forbidwords></forbidwords>
1270 <allowwords></allowwords>
1271 <forbidfloat>1</forbidfloat>
1272 <requirelowestterms>1</requirelowestterms>
1273 <checkanswertype>1</checkanswertype>
1274 <mustverify>1</mustverify>
1275 <showvalidation>1</showvalidation>
1280 <value>1.0000000</value>
1281 <autosimplify>1</autosimplify>
1284 </feedbackvariables>
1287 <answertest>SubstEquiv</answertest>
1290 <testoptions></testoptions>
1292 <truescoremode>=</truescoremode>
1293 <truescore>1.0000000</truescore>
1294 <truepenalty></truepenalty>
1295 <truenextnode>-1</truenextnode>
1296 <trueanswernote>eq-0-T </trueanswernote>
1297 <truefeedback format="html">
1300 <falsescoremode>=</falsescoremode>
1301 <falsescore>0.0000000</falsescore>
1302 <falsepenalty></falsepenalty>
1303 <falsenextnode>1</falsenextnode>
1304 <falseanswernote>eq-0-F </falseanswernote>
1305 <falsefeedback format="html">
1311 <answertest>SubstEquiv</answertest>
1314 <testoptions></testoptions>
1316 <truescoremode>=</truescoremode>
1317 <truescore>1.0000000</truescore>
1318 <truepenalty></truepenalty>
1319 <truenextnode>-1</truenextnode>
1320 <trueanswernote>eq-1-T </trueanswernote>
1321 <truefeedback format="html">
1324 <falsescoremode>=</falsescoremode>
1325 <falsescore>0.0000000</falsescore>
1326 <falsepenalty></falsepenalty>
1327 <falsenextnode>-1</falsenextnode>
1328 <falseanswernote>eq-1-F </falseanswernote>
1329 <falsefeedback format="html">
1336 <value>1.0000000</value>
1337 <autosimplify>1</autosimplify>
1340 </feedbackvariables>
1343 <answertest>AlgEquiv</answertest>
1346 <testoptions></testoptions>
1348 <truescoremode>=</truescoremode>
1349 <truescore>1.0000000</truescore>
1350 <truepenalty></truepenalty>
1351 <truenextnode>-1</truenextnode>
1352 <trueanswernote>short-0-T </trueanswernote>
1353 <truefeedback format="html">
1356 <falsescoremode>=</falsescoremode>
1357 <falsescore>0.0000000</falsescore>
1358 <falsepenalty></falsepenalty>
1359 <falsenextnode>-1</falsenextnode>
1360 <falseanswernote>short-0-F </falseanswernote>
1361 <falsefeedback format="html">
1368 <value>1.0000000</value>
1369 <autosimplify>1</autosimplify>
1371 <text>v1:first(listofvars(ans1));
1372 ftm:setify(map(rhs,solve(ans1,v1)));</text>
1373 </feedbackvariables>
1376 <answertest>SubstEquiv</answertest>
1379 <testoptions></testoptions>
1381 <truescoremode>=</truescoremode>
1382 <truescore>1.0000000</truescore>
1383 <truepenalty></truepenalty>
1384 <truenextnode>3</truenextnode>
1385 <trueanswernote>sol-0-T </trueanswernote>
1386 <truefeedback format="html">
1389 <falsescoremode>=</falsescoremode>
1390 <falsescore>0.0000000</falsescore>
1391 <falsepenalty></falsepenalty>
1392 <falsenextnode>1</falsenextnode>
1393 <falseanswernote>sol-0-F </falseanswernote>
1394 <falsefeedback format="html">
1400 <answertest>SubstEquiv</answertest>
1403 <testoptions></testoptions>
1405 <truescoremode>=</truescoremode>
1406 <truescore>1.0000000</truescore>
1407 <truepenalty></truepenalty>
1408 <truenextnode>4</truenextnode>
1409 <trueanswernote>sol-1-T </trueanswernote>
1410 <truefeedback format="html">
1413 <falsescoremode>=</falsescoremode>
1414 <falsescore>0.0000000</falsescore>
1415 <falsepenalty></falsepenalty>
1416 <falsenextnode>2</falsenextnode>
1417 <falseanswernote>sol-1-F </falseanswernote>
1418 <falsefeedback format="html">
1424 <answertest>AlgEquiv</answertest>
1427 <testoptions></testoptions>
1429 <truescoremode>=</truescoremode>
1430 <truescore>1.0000000</truescore>
1431 <truepenalty></truepenalty>
1432 <truenextnode>-1</truenextnode>
1433 <trueanswernote>sol-2-T </trueanswernote>
1434 <truefeedback format="html">
1435 <text><![CDATA[<p>You have correctly solved the equation you have entered in part 1. Please try both parts again!</p>]]></text>
1437 <falsescoremode>=</falsescoremode>
1438 <falsescore>0.0000000</falsescore>
1439 <falsepenalty></falsepenalty>
1440 <falsenextnode>-1</falsenextnode>
1441 <falseanswernote>sol-2-F </falseanswernote>
1442 <falsefeedback format="html">
1448 <answertest>AlgEquiv</answertest>
1451 <testoptions></testoptions>
1453 <truescoremode>=</truescoremode>
1454 <truescore>1.0000000</truescore>
1455 <truepenalty></truepenalty>
1456 <truenextnode>-1</truenextnode>
1457 <trueanswernote>sol-3-T </trueanswernote>
1458 <truefeedback format="html">
1461 <falsescoremode>=</falsescoremode>
1462 <falsescore>0.0000000</falsescore>
1463 <falsepenalty></falsepenalty>
1464 <falsenextnode>-1</falsenextnode>
1465 <falseanswernote>sol-3-F </falseanswernote>
1466 <falsefeedback format="html">
1472 <answertest>AlgEquiv</answertest>
1475 <testoptions></testoptions>
1477 <truescoremode>=</truescoremode>
1478 <truescore>1.0000000</truescore>
1479 <truepenalty></truepenalty>
1480 <truenextnode>-1</truenextnode>
1481 <trueanswernote>sol-5-T</trueanswernote>
1482 <truefeedback format="html">
1485 <falsescoremode>-</falsescoremode>
1486 <falsescore>0.0000000</falsescore>
1487 <falsepenalty></falsepenalty>
1488 <falsenextnode>-1</falsenextnode>
1489 <falseanswernote>sol-5-F</falseanswernote>
1490 <falsefeedback format="html">
1495 <deployedseed>92</deployedseed>
1496 <deployedseed>1621764605</deployedseed>
1497 <deployedseed>79313047</deployedseed>
1498 <deployedseed>1740562616</deployedseed>
1500 <testcase>1</testcase>
1507 <value>ev({-rp,-rn},simp)</value>
1511 <value>ev(-rn,simp)</value>
1515 <expectedscore>1.0000000</expectedscore>
1516 <expectedpenalty>0.0000000</expectedpenalty>
1517 <expectedanswernote>eq-0-T</expectedanswernote>
1521 <expectedscore>1.0000000</expectedscore>
1522 <expectedpenalty>0.0000000</expectedpenalty>
1523 <expectedanswernote>short-0-T</expectedanswernote>
1527 <expectedscore>1.0000000</expectedscore>
1528 <expectedpenalty>0.0000000</expectedpenalty>
1529 <expectedanswernote>sol-3-T</expectedanswernote>
1533 <testcase>2</testcase>
1540 <value>ev({rp,rn},simp)</value>
1544 <value>ev(-rn,simp)</value>
1548 <expectedscore>1.0000000</expectedscore>
1549 <expectedpenalty>0.0000000</expectedpenalty>
1550 <expectedanswernote>eq-1-T</expectedanswernote>
1554 <expectedscore>1.0000000</expectedscore>
1555 <expectedpenalty>0.0000000</expectedpenalty>
1556 <expectedanswernote>short-0-T</expectedanswernote>
1560 <expectedscore>1.0000000</expectedscore>
1561 <expectedpenalty>0.0000000</expectedpenalty>
1562 <expectedanswernote>sol-5-T</expectedanswernote>
1566 <testcase>3</testcase>
1569 <value>x+sg=-ar</value>
1573 <value>{-ar-sg}</value>
1581 <expectedscore>0.0000000</expectedscore>
1582 <expectedpenalty>0.1000000</expectedpenalty>
1583 <expectedanswernote>eq-1-F</expectedanswernote>
1587 <expectedscore></expectedscore>
1588 <expectedpenalty></expectedpenalty>
1589 <expectedanswernote>NULL</expectedanswernote>
1593 <expectedscore>1.0000000</expectedscore>
1594 <expectedpenalty>0.0000000</expectedpenalty>
1595 <expectedanswernote>sol-2-T</expectedanswernote>
1600 <!-- question: 15 -->
1601 <question type="stack">
1603 <text>test_3_matrix</text>
1605 <questiontext format="html">
1606 <text><![CDATA[<p>Calculate \[ {@A@}.{@B@}\]</p>
1607 <p>Â [[input:ans1]]Â [[validation:ans1]]</p>]]></text>
1609 <generalfeedback format="html">
1610 <text><![CDATA[<p>To multiply matrices \(A\) and \(B\) we need to remember that the \((i,j)\)th entry is the scalar product of the \(i\)th row of \(A\) with the \(j\)th column of \(B\).</p>
1611 <p>\[ {@A@}.{@B@} = {@C@} = {@D@}.\]</p>]]></text>
1613 <defaultgrade>1.0000000</defaultgrade>
1614 <penalty>0.1000000</penalty>
1617 <text><![CDATA[A:ev(rand(matrix([5,5],[5,5]))+matrix([2,2],[2,2]),simp);
1618 B:ev(rand(matrix([5,5],[5,5]))+matrix([2,2],[2,2]),simp);
1622 C:zeromatrix (first(matrix_size(A)), second(matrix_size(A)));
1623 S:for a:1 thru first(matrix_size(A)) do for b:1 thru second(matrix_size(A)) do C[ev(a,simp),ev(b,simp)]:apply("+",zip_with("*",A[ev(a,simp)],BT[ev(b,simp)]));
1626 </questionvariables>
1627 <specificfeedback format="html">
1628 <text><![CDATA[<p>[[feedback:prt1]]</p>]]></text>
1631 <text>\({@A@}.{@B@}={@TA@}\)</text>
1633 <questionsimplify>0</questionsimplify>
1634 <assumepositive>0</assumepositive>
1635 <assumereal>0</assumereal>
1636 <prtcorrect format="html">
1637 <text><![CDATA[<p><span class="correct">Correct answer, well done.</span></p>]]></text>
1639 <prtpartiallycorrect format="html">
1640 <text><![CDATA[<p><span class="partially">Your answer is partially correct.</span></p>]]></text>
1641 </prtpartiallycorrect>
1642 <prtincorrect format="html">
1643 <text><![CDATA[<p><span class="incorrect">Incorrect answer.</span></p>]]></text>
1645 <multiplicationsign>dot</multiplicationsign>
1646 <sqrtsign>1</sqrtsign>
1647 <complexno>i</complexno>
1648 <inversetrig>cos-1</inversetrig>
1649 <matrixparens>[</matrixparens>
1650 <variantsselectionseed></variantsselectionseed>
1655 <boxsize>3</boxsize>
1656 <strictsyntax>1</strictsyntax>
1657 <insertstars>0</insertstars>
1658 <syntaxhint></syntaxhint>
1659 <syntaxattribute>0</syntaxattribute>
1660 <forbidwords></forbidwords>
1661 <allowwords></allowwords>
1662 <forbidfloat>1</forbidfloat>
1663 <requirelowestterms>1</requirelowestterms>
1664 <checkanswertype>1</checkanswertype>
1665 <mustverify>1</mustverify>
1666 <showvalidation>1</showvalidation>
1671 <value>1.0000000</value>
1672 <autosimplify>1</autosimplify>
1675 </feedbackvariables>
1678 <answertest>AlgEquiv</answertest>
1681 <testoptions></testoptions>
1683 <truescoremode>=</truescoremode>
1684 <truescore>1.0000000</truescore>
1685 <truepenalty></truepenalty>
1686 <truenextnode>-1</truenextnode>
1687 <trueanswernote>1-0-T </trueanswernote>
1688 <truefeedback format="html">
1691 <falsescoremode>=</falsescoremode>
1692 <falsescore>0.0000000</falsescore>
1693 <falsepenalty></falsepenalty>
1694 <falsenextnode>1</falsenextnode>
1695 <falseanswernote>1-0-F</falseanswernote>
1696 <falsefeedback format="html">
1702 <answertest>AlgEquiv</answertest>
1705 <testoptions></testoptions>
1707 <truescoremode>=</truescoremode>
1708 <truescore>0.0000000</truescore>
1709 <truepenalty></truepenalty>
1710 <truenextnode>-1</truenextnode>
1711 <trueanswernote>1-1-T </trueanswernote>
1712 <truefeedback format="html">
1713 <text><![CDATA[<p>Remember, you don't multiply matrices by multiplying the corresponding entries! A quite different process is needed.</p>]]></text>
1715 <falsescoremode>=</falsescoremode>
1716 <falsescore>0.0000000</falsescore>
1717 <falsepenalty></falsepenalty>
1718 <falsenextnode>2</falsenextnode>
1719 <falseanswernote>1-1-F </falseanswernote>
1720 <falsefeedback format="html">
1726 <answertest>AlgEquiv</answertest>
1729 <testoptions></testoptions>
1731 <truescoremode>=</truescoremode>
1732 <truescore>0.0000000</truescore>
1733 <truepenalty></truepenalty>
1734 <truenextnode>-1</truenextnode>
1735 <trueanswernote>1-3-T</trueanswernote>
1736 <truefeedback format="html">
1737 <text><![CDATA[<p>Please multiply the matrices. It looks like you have added them instead!</p>]]></text>
1739 <falsescoremode>=</falsescoremode>
1740 <falsescore>0.0000000</falsescore>
1741 <falsepenalty></falsepenalty>
1742 <falsenextnode>-1</falsenextnode>
1743 <falseanswernote>1-3-F</falseanswernote>
1744 <falsefeedback format="html">
1749 <deployedseed>86</deployedseed>
1750 <deployedseed>219862533</deployedseed>
1751 <deployedseed>1167893775</deployedseed>
1753 <testcase>1</testcase>
1760 <expectedscore>1.0000000</expectedscore>
1761 <expectedpenalty>0.0000000</expectedpenalty>
1762 <expectedanswernote>1-0-T </expectedanswernote>
1766 <testcase>2</testcase>
1773 <expectedscore>0.0000000</expectedscore>
1774 <expectedpenalty>0.1000000</expectedpenalty>
1775 <expectedanswernote>1-1-T</expectedanswernote>
1779 <testcase>4</testcase>
1786 <expectedscore></expectedscore>
1787 <expectedpenalty></expectedpenalty>
1788 <expectedanswernote>NULL</expectedanswernote>
1792 <testcase>5</testcase>
1799 <expectedscore>0.0000000</expectedscore>
1800 <expectedpenalty>0.1000000</expectedpenalty>
1801 <expectedanswernote>1-3-F</expectedanswernote>
1806 <!-- question: 18 -->
1807 <question type="stack">
1809 <text>test_5_cubic_spline</text>
1811 <questiontext format="html">
1812 <text><![CDATA[<p>Consider the real function</p>
1813 <p>\[ f(x) :=\left\{ \begin{array}{ll} {@f0@} & \mbox{for } x\leq {@x0@}, \\ p(x) & \mbox{for } {@x0@} < x < {@x1@}, \\ {@f1@} & \mbox{for }Â {@x1@}\leq x.\end{array} \right. \]</p>
1814 <p>{@plot(pg,[x,(x0-3),(x1+3)],[y,-3,3])@}</p>
1815 <p>Find the cubic polynomial \(p(x)\) which makes \(f(x)\) continuously differentiable. </p>
1816 <p>\(p(x)=\)[[input:ans1]]</p>
1817 <div>[[validation:ans1]]</div>]]></text>
1819 <generalfeedback format="html">
1820 <text><![CDATA[<p>First we need to find the information which \(p(x)\) needs to satisfy. Â This is</p>
1821 <p>\[ p({@x0@})={@subst(x=x0,f0)@}.\]</p>
1822 <p>\[ p({@x1@})={@subst(x=x1,f1)@}.\]</p>
1823 <p>\[ p'({@x0@})={@subst(x=x0,diff(f0,x))@}.\]</p>
1824 <p>\[ p'({@x1@})={@subst(x=x1,diff(f1,x))@}.\]</p>
1825 <p>If we define \(p(x)\) to be the cubic </p>
1826 <p>\[ p(x) = a_3 x^3 +Â a_2 x^2 +Â a_1 x +Â a_0,\]</p>
1827 <p>We then set up the matrix equation</p>
1828 <p>\[ {@CS@} {@CV@} = {@CT@} \]</p>
1829 <p>Solving this gives the coefficients, from which we get the polynomial.</p>
1830 <p>{@ta@}.</p>]]></text>
1832 <defaultgrade>1.0000000</defaultgrade>
1833 <penalty>0.0000000</penalty>
1836 <text><![CDATA[x0 : -1;
1840 /* Note, we should really use inf instead of 1000 here, but Maxima gives up plotting with the options used by STACK */
1841 pg:if x<x0 then f0 else if x<x1 then 1000 else f1;
1842 CS:matrix([1,x0,x0^2,x0^3],[0,1,2*x0,3*x0^2],[1,x1,x1^2,x1^3],[0,1,2*x1,3*x1^2])
1843 CT:transpose(matrix([ev(f0,x=x0),subst(x=x0,diff(f0,x)),ev(f1,x=x1),subst(x=x1,diff(f1,x))]));
1844 CV:transpose(matrix([a0,a1,a2,a3]));
1846 ta : matrix([1,x,x^2,x^3]).CS2;]]></text>
1847 </questionvariables>
1848 <specificfeedback format="html">
1849 <text><![CDATA[<p>[[feedback:prt1]]</p>]]></text>
1854 <questionsimplify>1</questionsimplify>
1855 <assumepositive>0</assumepositive>
1856 <assumereal>0</assumereal>
1857 <prtcorrect format="html">
1858 <text><![CDATA[<p>Correct answer, well done.</p>]]></text>
1860 <prtpartiallycorrect format="html">
1861 <text><![CDATA[<p>Your answer is partially correct.</p>]]></text>
1862 </prtpartiallycorrect>
1863 <prtincorrect format="html">
1864 <text><![CDATA[<p>Incorrect answer.</p>]]></text>
1866 <multiplicationsign>dot</multiplicationsign>
1867 <sqrtsign>1</sqrtsign>
1868 <complexno>i</complexno>
1869 <inversetrig>cos-1</inversetrig>
1870 <matrixparens>[</matrixparens>
1871 <variantsselectionseed></variantsselectionseed>
1874 <type>algebraic</type>
1876 <boxsize>15</boxsize>
1877 <strictsyntax>1</strictsyntax>
1878 <insertstars>0</insertstars>
1879 <syntaxhint></syntaxhint>
1880 <syntaxattribute>0</syntaxattribute>
1881 <forbidwords></forbidwords>
1882 <allowwords></allowwords>
1883 <forbidfloat>1</forbidfloat>
1884 <requirelowestterms>0</requirelowestterms>
1885 <checkanswertype>0</checkanswertype>
1886 <mustverify>1</mustverify>
1887 <showvalidation>1</showvalidation>
1892 <value>1.0000000</value>
1893 <autosimplify>1</autosimplify>
1895 <text><![CDATA[anspt : if (x>x0 and x<x1) then ans1 else 1000;]]></text>
1896 </feedbackvariables>
1899 <answertest>AlgEquiv</answertest>
1900 <sans>subst(x=x0,ans1)</sans>
1901 <tans>subst(x=x0,f0)</tans>
1902 <testoptions></testoptions>
1904 <truescoremode>+</truescoremode>
1905 <truescore>0.2500000</truescore>
1906 <truepenalty></truepenalty>
1907 <truenextnode>1</truenextnode>
1908 <trueanswernote>prt1-1-T</trueanswernote>
1909 <truefeedback format="html">
1912 <falsescoremode>=</falsescoremode>
1913 <falsescore>0.0000000</falsescore>
1914 <falsepenalty></falsepenalty>
1915 <falsenextnode>1</falsenextnode>
1916 <falseanswernote>prt1-1-F</falseanswernote>
1917 <falsefeedback format="html">
1918 <text><![CDATA[<p>Your answer does not satisfy \({@p(x0)=subst(x=x0,f0)@}\).</p>]]></text>
1923 <answertest>AlgEquiv</answertest>
1924 <sans>subst(x=x1,ans1)</sans>
1925 <tans>subst(x=x1,f1)</tans>
1926 <testoptions></testoptions>
1928 <truescoremode>+</truescoremode>
1929 <truescore>0.2500000</truescore>
1930 <truepenalty></truepenalty>
1931 <truenextnode>2</truenextnode>
1932 <trueanswernote>prt1-2-T</trueanswernote>
1933 <truefeedback format="html">
1936 <falsescoremode>+</falsescoremode>
1937 <falsescore>0.0000000</falsescore>
1938 <falsepenalty></falsepenalty>
1939 <falsenextnode>2</falsenextnode>
1940 <falseanswernote>prt1-2-F</falseanswernote>
1941 <falsefeedback format="html">
1942 <text><![CDATA[<p>Your answer does not satisfy \({@p(x1)=subst(x=x1,f1)@}\).</p>]]></text>
1947 <answertest>AlgEquiv</answertest>
1948 <sans>subst(x=x0,diff(ans1,x))</sans>
1949 <tans>subst(x=x0,diff(f0,x))</tans>
1950 <testoptions></testoptions>
1952 <truescoremode>+</truescoremode>
1953 <truescore>0.2500000</truescore>
1954 <truepenalty></truepenalty>
1955 <truenextnode>3</truenextnode>
1956 <trueanswernote>prt1-3-T</trueanswernote>
1957 <truefeedback format="html">
1960 <falsescoremode>+</falsescoremode>
1961 <falsescore>0.0000000</falsescore>
1962 <falsepenalty></falsepenalty>
1963 <falsenextnode>3</falsenextnode>
1964 <falseanswernote>prt1-3-F</falseanswernote>
1965 <falsefeedback format="html">
1966 <text><![CDATA[<p>Your answer does not satisfy \(p'({@x0@})={@subst(x=x0,diff(f0,x))@}\).</p>]]></text>
1971 <answertest>AlgEquiv</answertest>
1972 <sans>subst(x=x1,diff(ans1,x))</sans>
1973 <tans>subst(x=x1,diff(f1,x))</tans>
1974 <testoptions></testoptions>
1976 <truescoremode>+</truescoremode>
1977 <truescore>0.2500000</truescore>
1978 <truepenalty></truepenalty>
1979 <truenextnode>4</truenextnode>
1980 <trueanswernote>prt1-4-T</trueanswernote>
1981 <truefeedback format="html">
1984 <falsescoremode>+</falsescoremode>
1985 <falsescore>0.0000000</falsescore>
1986 <falsepenalty></falsepenalty>
1987 <falsenextnode>4</falsenextnode>
1988 <falseanswernote>prt1-4-F</falseanswernote>
1989 <falsefeedback format="html">
1990 <text><![CDATA[<p>Your answer does not satisfy \(p'({@x1@})={@subst(x=x1,diff(f1,x))@}\).</p>]]></text>
1995 <answertest>AlgEquiv</answertest>
1996 <sans>degree(ans1,x)</sans>
1998 <testoptions></testoptions>
2000 <truescoremode>+</truescoremode>
2001 <truescore>0.0000000</truescore>
2002 <truepenalty></truepenalty>
2003 <truenextnode>5</truenextnode>
2004 <trueanswernote>prt1-5-T</trueanswernote>
2005 <truefeedback format="html">
2008 <falsescoremode>=</falsescoremode>
2009 <falsescore>0.0000000</falsescore>
2010 <falsepenalty></falsepenalty>
2011 <falsenextnode>5</falsenextnode>
2012 <falseanswernote>prt1-5-F</falseanswernote>
2013 <falsefeedback format="html">
2014 <text><![CDATA[<p>Your answer is not a cubic!</p>]]></text>
2019 <answertest>AlgEquiv</answertest>
2022 <testoptions></testoptions>
2024 <truescoremode>=</truescoremode>
2025 <truescore>1.0000000</truescore>
2026 <truepenalty></truepenalty>
2027 <truenextnode>-1</truenextnode>
2028 <trueanswernote>prt1-6-T</trueanswernote>
2029 <truefeedback format="html">
2032 <falsescoremode>+</falsescoremode>
2033 <falsescore>0.0000000</falsescore>
2034 <falsepenalty></falsepenalty>
2035 <falsenextnode>-1</falsenextnode>
2036 <falseanswernote>prt1-6-F</falseanswernote>
2037 <falsefeedback format="html">
2038 <text><![CDATA[<p>Your answer is plotted below, although part of your graph might appear out of range of the plot!</p>
2039 <p>{@plot([pg,anspt],[x,(x0-3),(x1+3)],[y,-3,3])@}</p>]]></text>
2044 <testcase>1</testcase>
2051 <expectedscore>1.0000000</expectedscore>
2052 <expectedpenalty>0.0000000</expectedpenalty>
2053 <expectedanswernote>prt1-6-T</expectedanswernote>
2057 <testcase>2</testcase>
2064 <expectedscore>0.0000000</expectedscore>
2065 <expectedpenalty>0.0000000</expectedpenalty>
2066 <expectedanswernote>prt1-6-F</expectedanswernote>
2070 <testcase>3</testcase>
2073 <value>(2*%pi/9+2/27)*x^3-x^2/9+(-2*%pi/3-4/9)*x-4*%pi/9+20/27</value>
2077 <expectedscore>0.7500000</expectedscore>
2078 <expectedpenalty>0.0000000</expectedpenalty>
2079 <expectedanswernote>prt1-6-F</expectedanswernote>
2084 <!-- question: 16 -->
2085 <question type="stack">
2087 <text>text_4_complex-De Moivre's</text>
2089 <questiontext format="html">
2090 <text><![CDATA[<p>Given a complex number \(\displaystyle z={@q@}\) <span class="nolink">determine<br /></span></p>
2091 <p>\(|z^{@n@}|=\)[[input:ans1]]Â [[validation:ans1]]Â [[feedback:prt1]]</p>
2092 <p>and \(\arg(z^{@n@})=\)[[input:ans2]]Â [[validation:ans2]]Â [[feedback:prt2]]</p>]]></text>
2094 <generalfeedback format="html">
2095 <text><![CDATA[<p>It makes sense that the index laws should still apply. Â This is called De Moivre's theorem.</p>
2096 <p>\[ {@q^n@} ={@a^n@} e^{@b*n*%i*%pi@}.\]</p>
2098 <p>\[ e^{i\theta} = \cos(\theta)+i\sin(\theta).\]</p>
2099 <p>Working with the principle argument \(0\leq \theta \leq 2\pi\) gives us</p>
2100 <p>\[ {@q^n@} = {@a^n@} e^{@b*n*%i*%pi@} = {@a^n@} e^{@ev(b*n,simp)*%i*%pi@} =Â {@a^n@} e^{@p*%i*%pi@}.\]</p>]]></text>
2102 <defaultgrade>1.0000000</defaultgrade>
2103 <penalty>0.1000000</penalty>
2106 <text>a : ev(2+rand(15),simp);
2107 b : ev((-1)^rand(2)*((1+rand(10)))/(2+rand(15)),simp);
2108 n : ev(3+rand(20),simp);
2109 q : a*%e^(b*%i*%pi);
2110 p : ev(mod(b*n,2),simp);</text>
2111 </questionvariables>
2112 <specificfeedback format="html">
2116 <text>{@q^n = a^n*(cos(p*%i*%pi)+%i*sin(p*%i*%pi))@}</text>
2118 <questionsimplify>0</questionsimplify>
2119 <assumepositive>0</assumepositive>
2120 <assumereal>0</assumereal>
2121 <prtcorrect format="html">
2122 <text><![CDATA[<p>Correct answer, well done.</p>]]></text>
2124 <prtpartiallycorrect format="html">
2125 <text><![CDATA[<p>Your answer is partially correct.</p>]]></text>
2126 </prtpartiallycorrect>
2127 <prtincorrect format="html">
2128 <text><![CDATA[<p>Incorrect answer.</p>]]></text>
2130 <multiplicationsign>dot</multiplicationsign>
2131 <sqrtsign>1</sqrtsign>
2132 <complexno>i</complexno>
2133 <inversetrig>cos-1</inversetrig>
2134 <matrixparens>[</matrixparens>
2135 <variantsselectionseed></variantsselectionseed>
2138 <type>algebraic</type>
2140 <boxsize>15</boxsize>
2141 <strictsyntax>1</strictsyntax>
2142 <insertstars>0</insertstars>
2143 <syntaxhint></syntaxhint>
2144 <syntaxattribute>0</syntaxattribute>
2145 <forbidwords></forbidwords>
2146 <allowwords></allowwords>
2147 <forbidfloat>1</forbidfloat>
2148 <requirelowestterms>0</requirelowestterms>
2149 <checkanswertype>0</checkanswertype>
2150 <mustverify>1</mustverify>
2151 <showvalidation>1</showvalidation>
2156 <type>algebraic</type>
2158 <boxsize>15</boxsize>
2159 <strictsyntax>1</strictsyntax>
2160 <insertstars>0</insertstars>
2161 <syntaxhint></syntaxhint>
2162 <syntaxattribute>0</syntaxattribute>
2163 <forbidwords></forbidwords>
2164 <allowwords></allowwords>
2165 <forbidfloat>1</forbidfloat>
2166 <requirelowestterms>0</requirelowestterms>
2167 <checkanswertype>0</checkanswertype>
2168 <mustverify>1</mustverify>
2169 <showvalidation>1</showvalidation>
2174 <value>1.0000000</value>
2175 <autosimplify>1</autosimplify>
2178 </feedbackvariables>
2181 <answertest>AlgEquiv</answertest>
2184 <testoptions></testoptions>
2186 <truescoremode>=</truescoremode>
2187 <truescore>1.0000000</truescore>
2188 <truepenalty>0.0000000</truepenalty>
2189 <truenextnode>-1</truenextnode>
2190 <trueanswernote>prt1-1-T</trueanswernote>
2191 <truefeedback format="html">
2194 <falsescoremode>=</falsescoremode>
2195 <falsescore>0.0000000</falsescore>
2196 <falsepenalty>0.0000000</falsepenalty>
2197 <falsenextnode>-1</falsenextnode>
2198 <falseanswernote>prt1-1-F</falseanswernote>
2199 <falsefeedback format="html">
2206 <value>1.0000000</value>
2207 <autosimplify>1</autosimplify>
2210 </feedbackvariables>
2213 <answertest>AlgEquiv</answertest>
2214 <sans>[cos(ans2),sin(ans2)]</sans>
2215 <tans>[cos(b*%pi*n),sin(b*%pi*n)]</tans>
2216 <testoptions></testoptions>
2218 <truescoremode>=</truescoremode>
2219 <truescore>1.0000000</truescore>
2220 <truepenalty></truepenalty>
2221 <truenextnode>-1</truenextnode>
2222 <trueanswernote>prt2-1-T</trueanswernote>
2223 <truefeedback format="html">
2226 <falsescoremode>=</falsescoremode>
2227 <falsescore>0.0000000</falsescore>
2228 <falsepenalty></falsepenalty>
2229 <falsenextnode>-1</falsenextnode>
2230 <falseanswernote>prt2-1-F</falseanswernote>
2231 <falsefeedback format="html">
2237 <testcase>1</testcase>
2248 <expectedscore>1.0000000</expectedscore>
2249 <expectedpenalty>0.0000000</expectedpenalty>
2250 <expectedanswernote>prt1-1-T</expectedanswernote>
2254 <expectedscore></expectedscore>
2255 <expectedpenalty></expectedpenalty>
2256 <expectedanswernote>NULL</expectedanswernote>
2260 <testcase>2</testcase>
2267 <value>b*n*%pi</value>
2271 <expectedscore></expectedscore>
2272 <expectedpenalty></expectedpenalty>
2273 <expectedanswernote>NULL</expectedanswernote>
2277 <expectedscore>1.0000000</expectedscore>
2278 <expectedpenalty>0.0000000</expectedpenalty>
2279 <expectedanswernote>prt2-1-T</expectedanswernote>
2283 <testcase>3</testcase>
2290 <value>p*%pi</value>
2294 <expectedscore></expectedscore>
2295 <expectedpenalty></expectedpenalty>
2296 <expectedanswernote>NULL</expectedanswernote>
2300 <expectedscore>1.0000000</expectedscore>
2301 <expectedpenalty>0.0000000</expectedpenalty>
2302 <expectedanswernote>prt2-1-T</expectedanswernote>
2307 <!-- question: 19 -->
2308 <question type="stack">
2310 <text>text_6_odd_even</text>
2312 <questiontext format="html">
2313 <text><![CDATA[<p>1. Give an example of an odd function by typing an expression which represents it. \(f_1(x)=\) [[input:ans1]]. [[validation:ans1]] [[feedback:odd]]</p>
2314 <p>2. Give an example of an even function. \(f_2(x)=\) [[input:ans2]]. [[validation:ans2]] [[feedback:even]]</p>
2315 <p>3. Give an example of a function which is odd and even. \(f_3(x)=\) [[input:ans3]]. [[validation:ans3]] [[feedback:oddeven]]</p>
2316 <p>4. Is the answer to 3. unique? [[input:ans4]] (Or are there many different possibilities.) [[validation:ans4]] [[feedback:unique]]</p>]]></text>
2318 <generalfeedback format="html">
2321 <defaultgrade>1.0000000</defaultgrade>
2322 <penalty>0.3333333</penalty>
2326 </questionvariables>
2327 <specificfeedback format="html">
2333 <questionsimplify>1</questionsimplify>
2334 <assumepositive>0</assumepositive>
2335 <assumereal>0</assumereal>
2336 <prtcorrect format="html">
2337 <text><![CDATA[<p><span class="correct">Correct answer, well done.</span></p>]]></text>
2339 <prtpartiallycorrect format="html">
2340 <text><![CDATA[<p><span class="incorrect">Your answer is partially correct.</span></p>]]></text>
2341 </prtpartiallycorrect>
2342 <prtincorrect format="html">
2343 <text><![CDATA[<p><span class="partially">Incorrect answer.</span></p>]]></text>
2345 <multiplicationsign>dot</multiplicationsign>
2346 <sqrtsign>1</sqrtsign>
2347 <complexno>i</complexno>
2348 <inversetrig>cos-1</inversetrig>
2349 <matrixparens>[</matrixparens>
2350 <variantsselectionseed></variantsselectionseed>
2353 <type>algebraic</type>
2355 <boxsize>15</boxsize>
2356 <strictsyntax>1</strictsyntax>
2357 <insertstars>0</insertstars>
2358 <syntaxhint></syntaxhint>
2359 <syntaxattribute>0</syntaxattribute>
2360 <forbidwords></forbidwords>
2361 <allowwords></allowwords>
2362 <forbidfloat>1</forbidfloat>
2363 <requirelowestterms>1</requirelowestterms>
2364 <checkanswertype>1</checkanswertype>
2365 <mustverify>1</mustverify>
2366 <showvalidation>1</showvalidation>
2371 <type>algebraic</type>
2373 <boxsize>15</boxsize>
2374 <strictsyntax>1</strictsyntax>
2375 <insertstars>0</insertstars>
2376 <syntaxhint></syntaxhint>
2377 <syntaxattribute>0</syntaxattribute>
2378 <forbidwords></forbidwords>
2379 <allowwords></allowwords>
2380 <forbidfloat>1</forbidfloat>
2381 <requirelowestterms>1</requirelowestterms>
2382 <checkanswertype>1</checkanswertype>
2383 <mustverify>1</mustverify>
2384 <showvalidation>1</showvalidation>
2389 <type>algebraic</type>
2391 <boxsize>15</boxsize>
2392 <strictsyntax>1</strictsyntax>
2393 <insertstars>0</insertstars>
2394 <syntaxhint></syntaxhint>
2395 <syntaxattribute>0</syntaxattribute>
2396 <forbidwords></forbidwords>
2397 <allowwords></allowwords>
2398 <forbidfloat>1</forbidfloat>
2399 <requirelowestterms>1</requirelowestterms>
2400 <checkanswertype>1</checkanswertype>
2401 <mustverify>1</mustverify>
2402 <showvalidation>1</showvalidation>
2407 <type>boolean</type>
2409 <boxsize>15</boxsize>
2410 <strictsyntax>1</strictsyntax>
2411 <insertstars>0</insertstars>
2412 <syntaxhint></syntaxhint>
2413 <syntaxattribute>0</syntaxattribute>
2414 <forbidwords></forbidwords>
2415 <allowwords></allowwords>
2416 <forbidfloat>1</forbidfloat>
2417 <requirelowestterms>1</requirelowestterms>
2418 <checkanswertype>1</checkanswertype>
2419 <mustverify>1</mustverify>
2420 <showvalidation>1</showvalidation>
2425 <value>1.0000000</value>
2426 <autosimplify>1</autosimplify>
2428 <text>sa:ans2-subst(x=-x,ans2);</text>
2429 </feedbackvariables>
2432 <answertest>AlgEquiv</answertest>
2435 <testoptions></testoptions>
2437 <truescoremode>=</truescoremode>
2438 <truescore>1.0000000</truescore>
2439 <truepenalty></truepenalty>
2440 <truenextnode>-1</truenextnode>
2441 <trueanswernote>even-0-T </trueanswernote>
2442 <truefeedback format="html">
2445 <falsescoremode>=</falsescoremode>
2446 <falsescore>0.0000000</falsescore>
2447 <falsepenalty></falsepenalty>
2448 <falsenextnode>-1</falsenextnode>
2449 <falseanswernote>even-0-F </falseanswernote>
2450 <falsefeedback format="html">
2451 <text><![CDATA[<p>Your answer is not an even function. Look, \[ f(x)-f(-x)={@sa@} \neq 0.\]</p>]]></text>
2457 <value>1.0000000</value>
2458 <autosimplify>1</autosimplify>
2460 <text>sa:subst(x=-x,ans1)+ans1;</text>
2461 </feedbackvariables>
2464 <answertest>AlgEquiv</answertest>
2467 <testoptions></testoptions>
2469 <truescoremode>=</truescoremode>
2470 <truescore>1.0000000</truescore>
2471 <truepenalty></truepenalty>
2472 <truenextnode>-1</truenextnode>
2473 <trueanswernote>odd-0-T </trueanswernote>
2474 <truefeedback format="html">
2477 <falsescoremode>=</falsescoremode>
2478 <falsescore>0.0000000</falsescore>
2479 <falsepenalty></falsepenalty>
2480 <falsenextnode>-1</falsenextnode>
2481 <falseanswernote>odd-0-F </falseanswernote>
2482 <falsefeedback format="html">
2483 <text><![CDATA[<p>Your answer is not an odd function. Look, \[ f(x)+f(-x)={@sa@} \neq 0.\]</p>]]></text>
2488 <name>oddeven</name>
2489 <value>2.0000000</value>
2490 <autosimplify>1</autosimplify>
2492 <text>sa1:subst(x=-x,ans3)+ans3;
2493 sa2:ans3-subst(x=-x,ans3);</text>
2494 </feedbackvariables>
2497 <answertest>AlgEquiv</answertest>
2500 <testoptions></testoptions>
2502 <truescoremode>=</truescoremode>
2503 <truescore>0.5000000</truescore>
2504 <truepenalty></truepenalty>
2505 <truenextnode>1</truenextnode>
2506 <trueanswernote>ODD</trueanswernote>
2507 <truefeedback format="html">
2510 <falsescoremode>=</falsescoremode>
2511 <falsescore>0.0000000</falsescore>
2512 <falsepenalty></falsepenalty>
2513 <falsenextnode>1</falsenextnode>
2514 <falseanswernote>oddeven-0-F </falseanswernote>
2515 <falsefeedback format="html">
2516 <text><![CDATA[<p>Your answer is not an odd function. Look, \[ f(x)+f(-x)={@sa1@} \neq 0.\]</p>]]></text>
2521 <answertest>AlgEquiv</answertest>
2524 <testoptions></testoptions>
2526 <truescoremode>+</truescoremode>
2527 <truescore>0.5000000</truescore>
2528 <truepenalty></truepenalty>
2529 <truenextnode>-1</truenextnode>
2530 <trueanswernote>EVEN</trueanswernote>
2531 <truefeedback format="html">
2534 <falsescoremode>+</falsescoremode>
2535 <falsescore>0.0000000</falsescore>
2536 <falsepenalty></falsepenalty>
2537 <falsenextnode>-1</falsenextnode>
2538 <falseanswernote>oddeven-1-F </falseanswernote>
2539 <falsefeedback format="html">
2540 <text><![CDATA[<p>Your answer is not an even function. Look, \[ f(x)-f(-x)={@sa2@} \neq 0.\]</p>]]></text>
2546 <value>1.0000000</value>
2547 <autosimplify>1</autosimplify>
2550 </feedbackvariables>
2553 <answertest>AlgEquiv</answertest>
2556 <testoptions></testoptions>
2558 <truescoremode>=</truescoremode>
2559 <truescore>1.0000000</truescore>
2560 <truepenalty></truepenalty>
2561 <truenextnode>-1</truenextnode>
2562 <trueanswernote>unique-0-T </trueanswernote>
2563 <truefeedback format="html">
2566 <falsescoremode>=</falsescoremode>
2567 <falsescore>0.0000000</falsescore>
2568 <falsepenalty></falsepenalty>
2569 <falsenextnode>-1</falsenextnode>
2570 <falseanswernote>unique-0-F </falseanswernote>
2571 <falsefeedback format="html">
2577 <testcase>1</testcase>
2584 <value>cos(x)</value>
2596 <expectedscore>1.0000000</expectedscore>
2597 <expectedpenalty>0.0000000</expectedpenalty>
2598 <expectedanswernote>even-0-T</expectedanswernote>
2602 <expectedscore>1.0000000</expectedscore>
2603 <expectedpenalty>0.0000000</expectedpenalty>
2604 <expectedanswernote>odd-0-T</expectedanswernote>
2607 <name>oddeven</name>
2608 <expectedscore>1.0000000</expectedscore>
2609 <expectedpenalty>0.0000000</expectedpenalty>
2610 <expectedanswernote>EVEN</expectedanswernote>
2614 <expectedscore>1.0000000</expectedscore>
2615 <expectedpenalty>0.0000000</expectedpenalty>
2616 <expectedanswernote>unique-0-T</expectedanswernote>
2620 <testcase>2</testcase>
2635 <value>false</value>
2639 <expectedscore>0.0000000</expectedscore>
2640 <expectedpenalty>0.3333333</expectedpenalty>
2641 <expectedanswernote>even-0-F</expectedanswernote>
2645 <expectedscore>0.0000000</expectedscore>
2646 <expectedpenalty>0.3333333</expectedpenalty>
2647 <expectedanswernote>odd-0-F</expectedanswernote>
2650 <name>oddeven</name>
2651 <expectedscore>0.5000000</expectedscore>
2652 <expectedpenalty>0.3333333</expectedpenalty>
2653 <expectedanswernote>oddeven-1-F</expectedanswernote>
2657 <expectedscore>0.0000000</expectedscore>
2658 <expectedpenalty>0.3333333</expectedpenalty>
2659 <expectedanswernote>unique-0-F</expectedanswernote>
2664 <!-- question: 23 -->
2665 <question type="stack">
2667 <text>text_7_solve_quadratic</text>
2669 <questiontext format="html">
2670 <text><![CDATA[<p></p><p>Solve {@first(ta)@}, by factoring and working line by line. Leave your answer in the form \({@v@}=\cdots \mbox{ or } {@v@}=\cdots\) in fully simplified form.</p><p>[[input:ans1]] [[validation:ans1]]</p>]]></text>
2672 <generalfeedback format="html">
2673 <text><![CDATA[<p>\[ {@stack_disp_arg(ta, true)@} \]</p>]]></text>
2675 <defaultgrade>1.0000000</defaultgrade>
2676 <penalty>0.1000000</penalty>
2682 p:expand((v-n1)*(v-n2))
2684 ta:[p=0,(v-n1)*(v-n2)=0,v-n1=0 nounor v-n2=0,v=n1 nounor v=n2]</text>
2685 </questionvariables>
2686 <specificfeedback format="html">
2687 <text>[[feedback:prt1]]</text>
2692 <questionsimplify>1</questionsimplify>
2693 <assumepositive>0</assumepositive>
2694 <assumereal>0</assumereal>
2695 <prtcorrect format="html">
2696 <text>Correct answer, well done.</text>
2698 <prtpartiallycorrect format="html">
2699 <text>Your answer is partially correct.</text>
2700 </prtpartiallycorrect>
2701 <prtincorrect format="html">
2702 <text>Incorrect answer.</text>
2704 <multiplicationsign>none</multiplicationsign>
2705 <sqrtsign>1</sqrtsign>
2706 <complexno>i</complexno>
2707 <inversetrig>cos-1</inversetrig>
2708 <matrixparens>[</matrixparens>
2709 <variantsselectionseed></variantsselectionseed>
2714 <boxsize>15</boxsize>
2715 <strictsyntax>1</strictsyntax>
2716 <insertstars>5</insertstars>
2717 <syntaxhint>firstline</syntaxhint>
2718 <syntaxattribute>0</syntaxattribute>
2719 <forbidwords></forbidwords>
2720 <allowwords></allowwords>
2721 <forbidfloat>1</forbidfloat>
2722 <requirelowestterms>0</requirelowestterms>
2723 <checkanswertype>0</checkanswertype>
2724 <mustverify>1</mustverify>
2725 <showvalidation>1</showvalidation>
2726 <options>firstline</options>
2730 <value>1.0000000</value>
2731 <autosimplify>0</autosimplify>
2733 <text>foundfac1:ev(sublist(ans1,lambda([ex], equationp(ex) and is(rhs(ex)=0))),simp);
2734 foundfac2:ev(any_listp(lambda([ex], second(ATFacForm(lhs(ex),lhs(ex),x))), foundfac1),simp);</text>
2735 </feedbackvariables>
2738 <answertest>EquivFirst</answertest>
2741 <testoptions>x</testoptions>
2743 <truescoremode>=</truescoremode>
2744 <truescore>1.0000000</truescore>
2745 <truepenalty></truepenalty>
2746 <truenextnode>1</truenextnode>
2747 <trueanswernote>prt1-1-T</trueanswernote>
2748 <truefeedback format="html">
2751 <falsescoremode>=</falsescoremode>
2752 <falsescore>0.0000000</falsescore>
2753 <falsepenalty></falsepenalty>
2754 <falsenextnode>-1</falsenextnode>
2755 <falseanswernote>prt1-1-F</falseanswernote>
2756 <falsefeedback format="html">
2762 <answertest>EqualComAss</answertest>
2763 <sans>last(ans1)</sans>
2764 <tans>last(ta)</tans>
2765 <testoptions></testoptions>
2767 <truescoremode>+</truescoremode>
2768 <truescore>0.0000000</truescore>
2769 <truepenalty></truepenalty>
2770 <truenextnode>2</truenextnode>
2771 <trueanswernote>prt1-2-T</trueanswernote>
2772 <truefeedback format="html">
2775 <falsescoremode>=</falsescoremode>
2776 <falsescore>0.0000000</falsescore>
2777 <falsepenalty></falsepenalty>
2778 <falsenextnode>2</falsenextnode>
2779 <falseanswernote>prt1-2-F</falseanswernote>
2780 <falsefeedback format="html">
2781 <text><![CDATA[Your answer is not in the correct form, which is \({@v@}=\cdots \mbox{ or } {@v@}=\cdots\) where numbers are fully simplified.<p><br></p>]]></text>
2786 <answertest>AlgEquiv</answertest>
2787 <sans>foundfac2</sans>
2789 <testoptions></testoptions>
2791 <truescoremode>+</truescoremode>
2792 <truescore>0.0000000</truescore>
2793 <truepenalty></truepenalty>
2794 <truenextnode>-1</truenextnode>
2795 <trueanswernote>prt1-3-T</trueanswernote>
2796 <truefeedback format="html">
2799 <falsescoremode>=</falsescoremode>
2800 <falsescore>0.0000000</falsescore>
2801 <falsepenalty></falsepenalty>
2802 <falsenextnode>-1</falsenextnode>
2803 <falseanswernote>prt1-3-F</falseanswernote>
2804 <falsefeedback format="html">
2805 <text><![CDATA[<p>The question asked you to solve the equation by factoring the equation. The factored form should appear as one line in your working.</p>]]></text>
2810 <testcase>1</testcase>
2817 <expectedscore>1.0000000</expectedscore>
2818 <expectedpenalty>0.0000000</expectedpenalty>
2819 <expectedanswernote>prt1-3-T</expectedanswernote>
2823 <testcase>2</testcase>
2826 <value>[p=0, (x-n1)*(x-n1) = 0, x=n1 nounor n2]</value>
2830 <expectedscore></expectedscore>
2831 <expectedpenalty></expectedpenalty>
2832 <expectedanswernote>NULL</expectedanswernote>
2836 <testcase>3</testcase>
2839 <value> [p=0,x-n1 = 0 nounor x-n2 = 0,x = n1 nounor x = n2]</value>
2843 <expectedscore>0.0000000</expectedscore>
2844 <expectedpenalty>0.1000000</expectedpenalty>
2845 <expectedanswernote>prt1-3-F</expectedanswernote>
2849 <testcase>4</testcase>
2852 <value>[p=0,(x-(n1+n2)/2)^2-ev((n1+n2)^2/4-n1*n2,simp)=0,(x-(n1+n2)/2)^2=ev((n1+n2)^2/4-n1*n2,simp),(x-(n1+n2)/2)=+-ev(sqrt((n1+n2)^2/4-n1*n2),simp),x=ev((n1+n2)/2+sqrt((n1+n2)^2/4-n1*n2),simp) nounor x=ev((n1+n2)/2-sqrt((n1+n2)^2/4-n1*n2),simp)] </value>
2856 <expectedscore>0.0000000</expectedscore>
2857 <expectedpenalty>0.1000000</expectedpenalty>
2858 <expectedanswernote>prt1-3-F</expectedanswernote>
2863 <!-- question: 0 -->
2864 <question type="category">
2866 <text>$course$/Default for Scratch/input_samples</text>
2871 <!-- question: 10 -->
2872 <question type="stack">
2874 <text>Textarea test</text>
2876 <questiontext format="html">
2877 <text><![CDATA[Dummy maths input: \({@ta@}\).<br>[[input:ans1]] [[validation:ans1]]]]></text>
2879 <generalfeedback format="html">
2882 <defaultgrade>1.0000000</defaultgrade>
2883 <penalty>0.1000000</penalty>
2886 <text>ta:[x=1,x=2]</text>
2887 </questionvariables>
2888 <specificfeedback format="html">
2889 <text><![CDATA[[[feedback:prt1]]</p><div>]]></text>
2892 <text>vendor/bin/phpunit --group qtype_stack</text>
2894 <questionsimplify>1</questionsimplify>
2895 <assumepositive>0</assumepositive>
2896 <assumereal>0</assumereal>
2897 <prtcorrect format="html">
2898 <text>Correct answer, well done.</text>
2900 <prtpartiallycorrect format="html">
2901 <text>Your answer is partially correct.</text>
2902 </prtpartiallycorrect>
2903 <prtincorrect format="html">
2904 <text>Incorrect answer.</text>
2906 <multiplicationsign>dot</multiplicationsign>
2907 <sqrtsign>1</sqrtsign>
2908 <complexno>i</complexno>
2909 <inversetrig>cos-1</inversetrig>
2910 <matrixparens>[</matrixparens>
2911 <variantsselectionseed></variantsselectionseed>
2914 <type>textarea</type>
2916 <boxsize>15</boxsize>
2917 <strictsyntax>1</strictsyntax>
2918 <insertstars>1</insertstars>
2919 <syntaxhint></syntaxhint>
2920 <syntaxattribute>0</syntaxattribute>
2921 <forbidwords></forbidwords>
2922 <allowwords></allowwords>
2923 <forbidfloat>1</forbidfloat>
2924 <requirelowestterms>0</requirelowestterms>
2925 <checkanswertype>0</checkanswertype>
2926 <mustverify>1</mustverify>
2927 <showvalidation>1</showvalidation>
2932 <value>1.0000000</value>
2933 <autosimplify>1</autosimplify>
2936 </feedbackvariables>
2939 <answertest>AlgEquiv</answertest>
2942 <testoptions></testoptions>
2944 <truescoremode>=</truescoremode>
2945 <truescore>1.0000000</truescore>
2946 <truepenalty></truepenalty>
2947 <truenextnode>-1</truenextnode>
2948 <trueanswernote>prt1-1-T</trueanswernote>
2949 <truefeedback format="html">
2952 <falsescoremode>=</falsescoremode>
2953 <falsescore>0.0000000</falsescore>
2954 <falsepenalty></falsepenalty>
2955 <falsenextnode>-1</falsenextnode>
2956 <falseanswernote>prt1-1-F</falseanswernote>
2957 <falsefeedback format="html">
2964 <!-- question: 11 -->
2965 <question type="stack">
2967 <text>True/false</text>
2969 <questiontext format="html">
2970 <text><![CDATA[<p>All generalizations are false: [[input:ans1]] [[validation:ans1]]</p><p><br></p>]]></text>
2972 <generalfeedback format="html">
2975 <defaultgrade>1.0000000</defaultgrade>
2976 <penalty>0.1000000</penalty>
2980 </questionvariables>
2981 <specificfeedback format="html">
2982 <text>[[feedback:prt1]]</text>
2987 <questionsimplify>1</questionsimplify>
2988 <assumepositive>0</assumepositive>
2989 <assumereal>0</assumereal>
2990 <prtcorrect format="html">
2991 <text>Correct answer, well done.</text>
2993 <prtpartiallycorrect format="html">
2994 <text>Your answer is partially correct.</text>
2995 </prtpartiallycorrect>
2996 <prtincorrect format="html">
2997 <text>Incorrect answer.</text>
2999 <multiplicationsign>dot</multiplicationsign>
3000 <sqrtsign>1</sqrtsign>
3001 <complexno>i</complexno>
3002 <inversetrig>cos-1</inversetrig>
3003 <matrixparens>[</matrixparens>
3004 <variantsselectionseed></variantsselectionseed>
3007 <type>boolean</type>
3009 <boxsize>15</boxsize>
3010 <strictsyntax>1</strictsyntax>
3011 <insertstars>0</insertstars>
3012 <syntaxhint></syntaxhint>
3013 <syntaxattribute>0</syntaxattribute>
3014 <forbidwords></forbidwords>
3015 <allowwords></allowwords>
3016 <forbidfloat>1</forbidfloat>
3017 <requirelowestterms>0</requirelowestterms>
3018 <checkanswertype>0</checkanswertype>
3019 <mustverify>1</mustverify>
3020 <showvalidation>1</showvalidation>
3025 <value>1.0000000</value>
3026 <autosimplify>1</autosimplify>
3029 </feedbackvariables>
3032 <answertest>AlgEquiv</answertest>
3035 <testoptions></testoptions>
3037 <truescoremode>=</truescoremode>
3038 <truescore>0.5000000</truescore>
3039 <truepenalty></truepenalty>
3040 <truenextnode>-1</truenextnode>
3041 <trueanswernote>prt1-1-T</trueanswernote>
3042 <truefeedback format="html">
3043 <text><![CDATA[<p>Who knows!</p>]]></text>
3045 <falsescoremode>=</falsescoremode>
3046 <falsescore>0.5000000</falsescore>
3047 <falsepenalty></falsepenalty>
3048 <falsenextnode>-1</falsenextnode>
3049 <falseanswernote>prt1-1-F</falseanswernote>
3050 <falsefeedback format="html">
3051 <text><![CDATA[<p>Who knows!<br></p>]]></text>
3057 <!-- question: 12 -->
3058 <question type="stack">
3062 <questiontext format="html">
3063 <text><![CDATA[<p>What is gravity?</p><p>[[input:ans1]]</p><div>[[validation:ans1]]</div>]]></text>
3065 <generalfeedback format="html">
3068 <defaultgrade>1.0000000</defaultgrade>
3069 <penalty>0.1000000</penalty>
3072 <text>ta:9.81*m*s^-2</text>
3073 </questionvariables>
3074 <specificfeedback format="html">
3075 <text>[[feedback:prt1]]</text>
3080 <questionsimplify>1</questionsimplify>
3081 <assumepositive>0</assumepositive>
3082 <assumereal>0</assumereal>
3083 <prtcorrect format="html">
3084 <text>Correct answer, well done.</text>
3086 <prtpartiallycorrect format="html">
3087 <text>Your answer is partially correct.</text>
3088 </prtpartiallycorrect>
3089 <prtincorrect format="html">
3090 <text>Incorrect answer.</text>
3092 <multiplicationsign>dot</multiplicationsign>
3093 <sqrtsign>1</sqrtsign>
3094 <complexno>i</complexno>
3095 <inversetrig>cos-1</inversetrig>
3096 <matrixparens>[</matrixparens>
3097 <variantsselectionseed></variantsselectionseed>
3102 <boxsize>15</boxsize>
3103 <strictsyntax>1</strictsyntax>
3104 <insertstars>0</insertstars>
3105 <syntaxhint></syntaxhint>
3106 <syntaxattribute>0</syntaxattribute>
3107 <forbidwords></forbidwords>
3108 <allowwords></allowwords>
3109 <forbidfloat>1</forbidfloat>
3110 <requirelowestterms>0</requirelowestterms>
3111 <checkanswertype>0</checkanswertype>
3112 <mustverify>1</mustverify>
3113 <showvalidation>1</showvalidation>
3118 <value>1.0000000</value>
3119 <autosimplify>1</autosimplify>
3122 </feedbackvariables>
3125 <answertest>Units</answertest>
3128 <testoptions>3</testoptions>
3130 <truescoremode>=</truescoremode>
3131 <truescore>1.0000000</truescore>
3132 <truepenalty></truepenalty>
3133 <truenextnode>-1</truenextnode>
3134 <trueanswernote>prt1-1-T</trueanswernote>
3135 <truefeedback format="html">
3138 <falsescoremode>=</falsescoremode>
3139 <falsescore>0.0000000</falsescore>
3140 <falsepenalty></falsepenalty>
3141 <falsenextnode>-1</falsenextnode>
3142 <falseanswernote>prt1-1-F</falseanswernote>
3143 <falsefeedback format="html">