<?xml version="1.0" encoding="UTF-8"?>
<quiz>
  <question type="stack">
    <name>
      <text>10.2.1.4 Argand Diagram(Algebraic Operations)</text>
    </name>
    <questiontext format="html">
      <text><![CDATA[<p class="HELM_exercise">Exercise</p>
<p>Given that <span class="math inline">\(z={@z@}\)</span>, <span class="math inline">\(w={@w@}\)</span> , which of the points below represent \({@s@}z+{@t@}w\) on an Argand diagram.</p>
<figure class="HELM_figure"><img src="@@PLUGINFILE@@/Complex%20Numbers%20Argand%20plot.svg" alt="Argand diagram with points A, B, C, D" width="300" height="238" class="img-responsive atto_image_button_text-bottom"><br></figure>
<p><br></p>
<p>\({@s@}z+{@t@}w=\)[[input:ans1]] [[validation:ans1]]&nbsp;[[feedback:prt1]]<br></p>]]></text>
<file name="Complex Numbers Argand plot.svg" path="/" encoding="base64">[encoded data, 20268 characters]</file>
    </questiontext>
    <generalfeedback format="html">
      <text><![CDATA[<p>We are given that \(z={@z@}\) and&nbsp;\(w={@w@}\). Then,&nbsp;&nbsp;\({@s@}z+{@t@}w={@s@}({@z@})+{@t@}({@w@}).\) This is the point \({@cor1@}\) on the Argand diagram.</p>]]></text>
    </generalfeedback>
    <defaultgrade>1</defaultgrade>
    <penalty>0.1</penalty>
    <hidden>0</hidden>
    <idnumber/>
    <stackversion>
      <text>2020120600</text>
    </stackversion>
    <questionvariables>
      <text><![CDATA[a:rand_with_prohib(-6,6,[-2,-1,0,1,2]);
b:rand([a-1,a,a+1,-a-1,-a,-a+1]);
absa:abs(a);
absb:abs(b);
z:a+%i*b;
c:rand_with_prohib(-7,7,[-2,-1,0,1,2]);
d:rand([c-1,c,c+1,-c-1,-c,-c+1]);
absc:abs(c);
absd:abs(d);
w:c+%i*d;
s:rand(4)+1;
t:rand(4)+4;
exp1: ev(s*z+t*w,simp);
absreal:abs(s*a+t*c);
abscomp:abs(s*b+t*d);
pts:[ [[absreal,abscomp],"A"],[[absreal,-abscomp],"B"],[[-absreal,-abscomp],"C"],[[-absreal,abscomp],"D"] ];

ta:map(lambda([ex],[ex[1],is(ex[1]=[s*a+t*c,s*b+t*d]),ex[2]]),pts);
cor1:[s*a+t*c,s*b+t*d];
letter1:maplist(third, sublist(ta, lambda([ex], second(ex))))[1];]]></text>
    </questionvariables>
    <specificfeedback format="html">
      <text/>
    </specificfeedback>
    <questionnote format="moodle_auto_format">
      <text>\(z={@z@}\), \(w={@w@}\),\({@s@}z+{@t@}w\), So, \({@s@}z+{@t@}w={@cor1@}\).</text>
    </questionnote>
    <questiondescription format="moodle_auto_format">
      <text/>
    </questiondescription>
    <questionsimplify>1</questionsimplify>
    <assumepositive>0</assumepositive>
    <assumereal>0</assumereal>
    <prtcorrect format="html">
      <text><![CDATA[<span style="font-size: 1.5em; color:green;"><i class="fa fa-check"></i></span> Correct answer, well done.]]></text>
    </prtcorrect>
    <prtpartiallycorrect format="html">
      <text><![CDATA[<span style="font-size: 1.5em; color:orange;"><i class="fa fa-adjust"></i></span> Your answer is partially correct.]]></text>
    </prtpartiallycorrect>
    <prtincorrect format="html">
      <text><![CDATA[<span style="font-size: 1.5em; color:red;"><i class="fa fa-times"></i></span> Incorrect answer.]]></text>
    </prtincorrect>
    <decimals>.</decimals>
    <scientificnotation>*10</scientificnotation>
    <multiplicationsign>none</multiplicationsign>
    <sqrtsign>1</sqrtsign>
    <complexno>i</complexno>
    <inversetrig>cos-1</inversetrig>
    <logicsymbol>lang</logicsymbol>
    <matrixparens>[</matrixparens>
    <isbroken>0</isbroken>
    <variantsselectionseed/>
    <input>
      <name>ans1</name>
      <type>dropdown</type>
      <tans>ta</tans>
      <boxsize>5</boxsize>
      <strictsyntax>1</strictsyntax>
      <insertstars>0</insertstars>
      <syntaxhint/>
      <syntaxattribute>0</syntaxattribute>
      <forbidwords/>
      <allowwords/>
      <forbidfloat>1</forbidfloat>
      <requirelowestterms>0</requirelowestterms>
      <checkanswertype>0</checkanswertype>
      <mustverify>0</mustverify>
      <showvalidation>0</showvalidation>
      <options/>
    </input>
    <prt>
      <name>prt1</name>
      <value>1.0000000</value>
      <autosimplify>1</autosimplify>
      <feedbackstyle>1</feedbackstyle>
      <feedbackvariables>
        <text/>
      </feedbackvariables>
      <node>
        <name>0</name>
        <description/>
        <answertest>AlgEquiv</answertest>
        <sans>ans1</sans>
        <tans>cor1</tans>
        <testoptions/>
        <quiet>1</quiet>
        <truescoremode>=</truescoremode>
        <truescore>1.0000000</truescore>
        <truepenalty/>
        <truenextnode>-1</truenextnode>
        <trueanswernote>prt1-1-T</trueanswernote>
        <truefeedback format="html">
          <text/>
        </truefeedback>
        <falsescoremode>=</falsescoremode>
        <falsescore>0.0000000</falsescore>
        <falsepenalty/>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>prt1-1-F</falseanswernote>
        <falsefeedback format="html">
          <text/>
        </falsefeedback>
      </node>
    </prt>
    <deployedseed>968378954</deployedseed>
    <deployedseed>14024368</deployedseed>
    <deployedseed>1898290021</deployedseed>
    <deployedseed>1737355458</deployedseed>
    <deployedseed>390064873</deployedseed>
    <deployedseed>1523810932</deployedseed>
    <deployedseed>1504689373</deployedseed>
    <deployedseed>613332400</deployedseed>
    <deployedseed>1158218488</deployedseed>
    <deployedseed>415584686</deployedseed>
    <qtest>
      <testcase>1</testcase>
      <description/>
      <testinput>
        <name>ans1</name>
        <value>ev([s*a+t*c,s*b+t*d],simp)</value>
      </testinput>
      <expected>
        <name>prt1</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt1-1-T</expectedanswernote>
      </expected>
    </qtest>
    <qtest>
      <testcase>2</testcase>
      <description/>
      <testinput>
        <name>ans1</name>
        <value>ev([-(s*a+t*c),s*b+t*d],simp)</value>
      </testinput>
      <expected>
        <name>prt1</name>
        <expectedscore>0.0000000</expectedscore>
        <expectedpenalty>0.1000000</expectedpenalty>
        <expectedanswernote>prt1-1-F</expectedanswernote>
      </expected>
    </qtest>
    <qtest>
      <testcase>3</testcase>
      <description/>
      <testinput>
        <name>ans1</name>
        <value>ev([s*a+t*c,-(s*b+t*d)],simp)</value>
      </testinput>
      <expected>
        <name>prt1</name>
        <expectedscore>0.0000000</expectedscore>
        <expectedpenalty>0.1000000</expectedpenalty>
        <expectedanswernote>prt1-1-F</expectedanswernote>
      </expected>
    </qtest>
    <qtest>
      <testcase>4</testcase>
      <description/>
      <testinput>
        <name>ans1</name>
        <value>ev([-(s*a+t*c),-(s*b+t*d)],simp)</value>
      </testinput>
      <expected>
        <name>prt1</name>
        <expectedscore>0.0000000</expectedscore>
        <expectedpenalty>0.1000000</expectedpenalty>
        <expectedanswernote>prt1-1-F</expectedanswernote>
      </expected>
    </qtest>
  </question>
</quiz>
