<?xml version="1.0" encoding="UTF-8"?>
<quiz>
  <question type="stack">
    <name>
      <text>8.2.13 (Which are correct sigma properties?)</text>
    </name>
    <questiontext format="html">
      <text><![CDATA[<p class="noindent">Which of the following expressions involving sigma notation are correct?</p>  
 [[input:ans1]] [[validation:ans1]]]]></text>
    </questiontext>
    <generalfeedback format="html">
      <text><![CDATA[<p class="noindent"><br></p><p></p>]]></text>
    </generalfeedback>
    <defaultgrade>1</defaultgrade>
    <penalty>0.1</penalty>
    <hidden>0</hidden>
    <idnumber/>
    <stackversion>
      <text>2020081700</text>
    </stackversion>
    <questionvariables>
      <text><![CDATA[lower:0+rand(7)
upper:lower+4+rand(4)
expr:rand([rand([1,2,3,4])*n,n-1,n^2,(n-1)^2])
terms:makelist(ev(expr,n=n),n,lower,upper);
n1:rand_range(2,5);
simp:false;
cor1:'sum(n1*ak,k,1,n)=n1*'sum(ak,k,1,n);
cor2:'sum(ak+bk,k,1,n)='sum(ak,k,1,n)+'sum(bk,k,1,n);
cor3:'sum(ak,k,1,j)+'sum(ak,k,j+1,n)='sum(ak,k,1,n);
cor4:'sum(ak,k,1,n)='sum(aj,j,1,n);
incor1:'sum(k*ak,k,1,n)=k*'sum(ak,k,1,n);
incor2:'sum(akbk,k,1,n)='sum(ak,k,1,n)*'sum(bk,k,1,n);
incor3:'sum(ak,k,1,j)+'sum(ak,k,j,n)='sum(ak,k,1,n);
incor4:'sum(sqrt(ak),k,1,n)=sqrt('sum(ak,k,1,n));
corbase:[cor1,cor2,cor3,cor4];
wrongbase:[incor1,incor2,incor3,incor4];
mcq:multiselqnalpha(corbase, 3, wrongbase, 3);
ta1:maplist(lambda([ex],[ex[1],ex[2],ssubst("a_j","aj",ssubst("b_k","bk",ssubst("a_k","ak",ex[3])))]),mcq[1]);
version:mcq[2];
corr1:mcq_correct(ta1);
incorr1:mcq_incorrect(ta1);]]></text>
    </questionvariables>
    <specificfeedback format="html">
      <text>[[feedback:prt1]]</text>
    </specificfeedback>
    <questionnote format="moodle_auto_format">
      <text>{#version#}</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>checkbox</type>
      <tans>ta1</tans>
      <boxsize>15</boxsize>
      <strictsyntax>1</strictsyntax>
      <insertstars>0</insertstars>
      <syntaxhint/>
      <syntaxattribute>0</syntaxattribute>
      <forbidwords/>
      <allowwords/>
      <forbidfloat>1</forbidfloat>
      <requirelowestterms>1</requirelowestterms>
      <checkanswertype>1</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>setify(ans1)</sans>
        <tans>setify(corr1)</tans>
        <testoptions/>
        <quiet>0</quiet>
        <truescoremode>=</truescoremode>
        <truescore>1.0000000</truescore>
        <truepenalty>0</truepenalty>
        <truenextnode>-1</truenextnode>
        <trueanswernote>prt1-0-T</trueanswernote>
        <truefeedback format="html">
          <text/>
        </truefeedback>
        <falsescoremode>=</falsescoremode>
        <falsescore>0.0000000</falsescore>
        <falsepenalty>0.1</falsepenalty>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>prt1-0-F</falseanswernote>
        <falsefeedback format="html">
          <text/>
        </falsefeedback>
      </node>
    </prt>
    <deployedseed>2111419144</deployedseed>
    <deployedseed>1590656617</deployedseed>
    <deployedseed>571679485</deployedseed>
    <deployedseed>1335582422</deployedseed>
    <deployedseed>477684731</deployedseed>
    <deployedseed>1023745431</deployedseed>
    <deployedseed>1355307211</deployedseed>
    <deployedseed>254230217</deployedseed>
    <deployedseed>392149341</deployedseed>
    <deployedseed>126173667</deployedseed>
    <deployedseed>550817278</deployedseed>
    <deployedseed>1283270183</deployedseed>
    <deployedseed>1563245460</deployedseed>
    <deployedseed>1024147220</deployedseed>
    <deployedseed>2089278300</deployedseed>
    <deployedseed>1814891713</deployedseed>
    <deployedseed>1744435156</deployedseed>
    <deployedseed>384020975</deployedseed>
    <deployedseed>1957872565</deployedseed>
    <deployedseed>1454252415</deployedseed>
    <deployedseed>1460168931</deployedseed>
    <deployedseed>22513435</deployedseed>
    <deployedseed>1070925926</deployedseed>
    <deployedseed>810167506</deployedseed>
    <deployedseed>517202939</deployedseed>
    <deployedseed>1941098491</deployedseed>
    <deployedseed>812462926</deployedseed>
    <deployedseed>644684464</deployedseed>
    <deployedseed>2032340674</deployedseed>
    <deployedseed>1456233063</deployedseed>
    <deployedseed>407613175</deployedseed>
    <deployedseed>1146732568</deployedseed>
    <deployedseed>1029042236</deployedseed>
    <deployedseed>1290959820</deployedseed>
    <deployedseed>312308690</deployedseed>
    <qtest>
      <testcase>1</testcase>
      <description/>
      <testinput>
        <name>ans1</name>
        <value>corr1</value>
      </testinput>
      <expected>
        <name>prt1</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt1-0-T</expectedanswernote>
      </expected>
    </qtest>
    <qtest>
      <testcase>2</testcase>
      <description/>
      <testinput>
        <name>ans1</name>
        <value>incorr1</value>
      </testinput>
      <expected>
        <name>prt1</name>
        <expectedscore>0.0000000</expectedscore>
        <expectedpenalty>0.1000000</expectedpenalty>
        <expectedanswernote>prt1-0-F</expectedanswernote>
      </expected>
    </qtest>
    <qtest>
      <testcase>3</testcase>
      <description/>
      <testinput>
        <name>ans1</name>
        <value>sort([incorr1[1],corr1[1]])</value>
      </testinput>
      <expected>
        <name>prt1</name>
        <expectedscore>0.0000000</expectedscore>
        <expectedpenalty>0.1000000</expectedpenalty>
        <expectedanswernote>prt1-0-F</expectedanswernote>
      </expected>
    </qtest>
    <qtest>
      <testcase>4</testcase>
      <description/>
      <testinput>
        <name>ans1</name>
        <value>[corr1[1]]</value>
      </testinput>
      <expected>
        <name>prt1</name>
        <expectedscore>0.0000000</expectedscore>
        <expectedpenalty>0.1000000</expectedpenalty>
        <expectedanswernote>prt1-0-F</expectedanswernote>
      </expected>
    </qtest>
  </question>
</quiz>
