<?xml version="1.0" encoding="UTF-8"?>
<quiz>
  <question type="stack">
    <name>
      <text>8.2.10 (Find upper lim and expr, twice)</text>
    </name>
    <questiontext format="html">
      <text><![CDATA[<p>Write the following sum using sigma notation in two different ways:</p><p>\( {@ev(p,k=1)@}+{@ev(p,k=2)@}+{@ev(p,k=3)@}+\cdots+{@ev(p,k=ul)@}\)</p><p>\(=\displaystyle\sum_{k=A}^B \) [[input:expr1]]&nbsp;where \(A=\)[[input:lower1]], \(B=\)[[input:upper1]]&nbsp; <p>[[validation:expr1]][[validation:lower1]][[validation:upper1]]</p>[[feedback:prt1]]</p><p>\(=\displaystyle\sum_{k=C}^D \) [[input:expr2]]&nbsp;where \(C=\)[[input:lower2]], \(D=\)[[input:upper2]]&nbsp;<p>[[validation:expr2]][[validation:lower2]][[validation:upper2]]</p>[[feedback:prt2]]<br></p>]]></text>
    </questiontext>
    <generalfeedback format="html">
      <text><![CDATA[<p>Perhaps the simplest way to write this is \(\displaystyle\sum_{k={@talower1@}}^{@taupper1@}{@taexpr1@} \).</p><p>A variant of this comes from shifting the index of summation to get&nbsp;&nbsp;\(\displaystyle\sum_{k={@talower2@}}^{@taupper2@}{@taexpr2@} \).</p>]]></text>
    </generalfeedback>
    <defaultgrade>1</defaultgrade>
    <penalty>0.1</penalty>
    <hidden>0</hidden>
    <idnumber/>
    <stackversion>
      <text>2020081700</text>
    </stackversion>
    <questionvariables>
      <text>ul:10+rand(10);
a:rand([1,2,3,4]);
p:a*k+rand_with_prohib(-2,2,[-a,-2*a,-3*a]) /* this prevents the k=1,2,3 term being 0 */
taexpr1:p;
talower1:1;
taupper1:ul;
taexpr2:expand(ev(p,k=k-2));
talower2:3;
taupper2:ul+2;
trueterms:makelist(ev(taexpr1),k,talower1,taupper1);
sumval:sum(taexpr1,k,talower1,taupper1);</text>
    </questionvariables>
    <specificfeedback format="html">
      <text/>
    </specificfeedback>
    <questionnote format="moodle_auto_format">
      <text>\( {@ev(p,k=1)@}+{@ev(p,k=2)@}+{@ev(p,k=3)@}+\cdots+{@ev(p,k=ul)@}=\sum_{k=1}^{@ul@} {@p@}.\)</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>expr1</name>
      <type>algebraic</type>
      <tans>taexpr1</tans>
      <boxsize>7</boxsize>
      <strictsyntax>1</strictsyntax>
      <insertstars>0</insertstars>
      <syntaxhint/>
      <syntaxattribute>0</syntaxattribute>
      <forbidwords/>
      <allowwords/>
      <forbidfloat>1</forbidfloat>
      <requirelowestterms>0</requirelowestterms>
      <checkanswertype>0</checkanswertype>
      <mustverify>1</mustverify>
      <showvalidation>3</showvalidation>
      <options/>
    </input>
    <input>
      <name>expr2</name>
      <type>algebraic</type>
      <tans>taexpr2</tans>
      <boxsize>7</boxsize>
      <strictsyntax>1</strictsyntax>
      <insertstars>0</insertstars>
      <syntaxhint/>
      <syntaxattribute>0</syntaxattribute>
      <forbidwords/>
      <allowwords/>
      <forbidfloat>1</forbidfloat>
      <requirelowestterms>0</requirelowestterms>
      <checkanswertype>0</checkanswertype>
      <mustverify>1</mustverify>
      <showvalidation>3</showvalidation>
      <options/>
    </input>
    <input>
      <name>lower1</name>
      <type>algebraic</type>
      <tans>talower1</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>1</mustverify>
      <showvalidation>3</showvalidation>
      <options/>
    </input>
    <input>
      <name>lower2</name>
      <type>algebraic</type>
      <tans>talower2</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>1</mustverify>
      <showvalidation>3</showvalidation>
      <options/>
    </input>
    <input>
      <name>upper1</name>
      <type>algebraic</type>
      <tans>taupper1</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>1</mustverify>
      <showvalidation>3</showvalidation>
      <options/>
    </input>
    <input>
      <name>upper2</name>
      <type>algebraic</type>
      <tans>taupper2</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>1</mustverify>
      <showvalidation>3</showvalidation>
      <options/>
    </input>
    <prt>
      <name>prt1</name>
      <value>2.0000000</value>
      <autosimplify>1</autosimplify>
      <feedbackstyle>1</feedbackstyle>
      <feedbackvariables>
        <text>theirterms1:makelist(ev(expr1),k,lower1,upper1)</text>
      </feedbackvariables>
      <node>
        <name>3</name>
        <description/>
        <answertest>AlgEquiv</answertest>
        <sans>theirterms1</sans>
        <tans>trueterms</tans>
        <testoptions/>
        <quiet>1</quiet>
        <truescoremode>+</truescoremode>
        <truescore>1.0000000</truescore>
        <truepenalty/>
        <truenextnode>-1</truenextnode>
        <trueanswernote>prt1-4-T</trueanswernote>
        <truefeedback format="html">
          <text/>
        </truefeedback>
        <falsescoremode>-</falsescoremode>
        <falsescore>0.0000000</falsescore>
        <falsepenalty/>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>prt1-4-F</falseanswernote>
        <falsefeedback format="html">
          <text><![CDATA[<p>Your sum gives {@(simp:false,apply("+",theirterms1))@}.<br></p>]]></text>
        </falsefeedback>
      </node>
    </prt>
    <prt>
      <name>prt2</name>
      <value>1.0000000</value>
      <autosimplify>1</autosimplify>
      <feedbackstyle>1</feedbackstyle>
      <feedbackvariables>
        <text>theirterms2:makelist(ev(expr2),k,lower2,upper2)</text>
      </feedbackvariables>
      <node>
        <name>0</name>
        <description/>
        <answertest>AlgEquiv</answertest>
        <sans>theirterms2</sans>
        <tans>trueterms</tans>
        <testoptions/>
        <quiet>1</quiet>
        <truescoremode>=</truescoremode>
        <truescore>1.0000000</truescore>
        <truepenalty/>
        <truenextnode>1</truenextnode>
        <trueanswernote>prt2-1-T</trueanswernote>
        <truefeedback format="html">
          <text/>
        </truefeedback>
        <falsescoremode>=</falsescoremode>
        <falsescore>0.0000000</falsescore>
        <falsepenalty/>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>prt2-1-F</falseanswernote>
        <falsefeedback format="html">
          <text><![CDATA[<p>Your sum gives {@(simp:false,apply("+",theirterms2))@}.</p>]]></text>
        </falsefeedback>
      </node>
      <node>
        <name>1</name>
        <description/>
        <answertest>AlgEquiv</answertest>
        <sans>expr2</sans>
        <tans>expr1</tans>
        <testoptions/>
        <quiet>0</quiet>
        <truescoremode>-</truescoremode>
        <truescore>0.2000000</truescore>
        <truepenalty/>
        <truenextnode>-1</truenextnode>
        <trueanswernote>prt2-2-T</trueanswernote>
        <truefeedback format="html">
          <text><![CDATA[<p>Your two answers appear to be the same!</p>]]></text>
        </truefeedback>
        <falsescoremode>-</falsescoremode>
        <falsescore>0.0000000</falsescore>
        <falsepenalty/>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>prt2-2-F</falseanswernote>
        <falsefeedback format="html">
          <text/>
        </falsefeedback>
      </node>
    </prt>
    <deployedseed>1973857370</deployedseed>
    <deployedseed>2131643159</deployedseed>
    <deployedseed>1767508757</deployedseed>
    <deployedseed>608962047</deployedseed>
    <deployedseed>120638252</deployedseed>
    <deployedseed>567607704</deployedseed>
    <deployedseed>1971454155</deployedseed>
    <deployedseed>1438953923</deployedseed>
    <deployedseed>2045852995</deployedseed>
    <deployedseed>193365375</deployedseed>
    <deployedseed>1226361426</deployedseed>
    <deployedseed>679304657</deployedseed>
    <deployedseed>166807986</deployedseed>
    <deployedseed>826606576</deployedseed>
    <deployedseed>67999426</deployedseed>
    <deployedseed>1308381555</deployedseed>
    <deployedseed>513178054</deployedseed>
    <deployedseed>1069195875</deployedseed>
    <deployedseed>101498307</deployedseed>
    <deployedseed>1261595174</deployedseed>
    <deployedseed>2082924803</deployedseed>
    <deployedseed>497435009</deployedseed>
    <deployedseed>400955095</deployedseed>
    <deployedseed>1687213841</deployedseed>
    <deployedseed>17221807</deployedseed>
    <deployedseed>1060674292</deployedseed>
    <deployedseed>1258935991</deployedseed>
    <deployedseed>464189543</deployedseed>
    <deployedseed>1729555997</deployedseed>
    <deployedseed>57268647</deployedseed>
    <deployedseed>990057134</deployedseed>
    <deployedseed>219472396</deployedseed>
    <deployedseed>2069967849</deployedseed>
    <deployedseed>1438314326</deployedseed>
    <deployedseed>280644304</deployedseed>
    <deployedseed>384331104</deployedseed>
    <deployedseed>224763320</deployedseed>
    <deployedseed>702398469</deployedseed>
    <deployedseed>1504518322</deployedseed>
    <deployedseed>1128927851</deployedseed>
    <deployedseed>190536789</deployedseed>
    <qtest>
      <testcase>1</testcase>
      <description/>
      <testinput>
        <name>expr1</name>
        <value>taexpr1</value>
      </testinput>
      <testinput>
        <name>expr2</name>
        <value>taexpr2</value>
      </testinput>
      <testinput>
        <name>lower1</name>
        <value>talower1</value>
      </testinput>
      <testinput>
        <name>lower2</name>
        <value>talower2</value>
      </testinput>
      <testinput>
        <name>upper1</name>
        <value>taupper1</value>
      </testinput>
      <testinput>
        <name>upper2</name>
        <value>taupper2</value>
      </testinput>
      <expected>
        <name>prt1</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt1-4-T</expectedanswernote>
      </expected>
      <expected>
        <name>prt2</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt2-2-F</expectedanswernote>
      </expected>
    </qtest>
    <qtest>
      <testcase>2</testcase>
      <description/>
      <testinput>
        <name>expr1</name>
        <value>taexpr2</value>
      </testinput>
      <testinput>
        <name>expr2</name>
        <value>taexpr1</value>
      </testinput>
      <testinput>
        <name>lower1</name>
        <value>talower2</value>
      </testinput>
      <testinput>
        <name>lower2</name>
        <value>talower1</value>
      </testinput>
      <testinput>
        <name>upper1</name>
        <value>taupper2</value>
      </testinput>
      <testinput>
        <name>upper2</name>
        <value>taupper1</value>
      </testinput>
      <expected>
        <name>prt1</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt1-4-T</expectedanswernote>
      </expected>
      <expected>
        <name>prt2</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt2-2-F</expectedanswernote>
      </expected>
    </qtest>
    <qtest>
      <testcase>3</testcase>
      <description/>
      <testinput>
        <name>expr1</name>
        <value>taexpr1</value>
      </testinput>
      <testinput>
        <name>expr2</name>
        <value>taexpr1</value>
      </testinput>
      <testinput>
        <name>lower1</name>
        <value>talower2</value>
      </testinput>
      <testinput>
        <name>lower2</name>
        <value>talower2</value>
      </testinput>
      <testinput>
        <name>upper1</name>
        <value>taupper2</value>
      </testinput>
      <testinput>
        <name>upper2</name>
        <value>taupper2</value>
      </testinput>
      <expected>
        <name>prt1</name>
        <expectedscore>0.0000000</expectedscore>
        <expectedpenalty>0.1000000</expectedpenalty>
        <expectedanswernote>prt1-4-F</expectedanswernote>
      </expected>
      <expected>
        <name>prt2</name>
        <expectedscore>0.0000000</expectedscore>
        <expectedpenalty>0.1000000</expectedpenalty>
        <expectedanswernote>prt2-1-F</expectedanswernote>
      </expected>
    </qtest>
    <qtest>
      <testcase>4</testcase>
      <description/>
      <testinput>
        <name>expr1</name>
        <value>taexpr1</value>
      </testinput>
      <testinput>
        <name>expr2</name>
        <value>taexpr1</value>
      </testinput>
      <testinput>
        <name>lower1</name>
        <value>talower1</value>
      </testinput>
      <testinput>
        <name>lower2</name>
        <value>talower1</value>
      </testinput>
      <testinput>
        <name>upper1</name>
        <value>taupper1</value>
      </testinput>
      <testinput>
        <name>upper2</name>
        <value>taupper1</value>
      </testinput>
      <expected>
        <name>prt1</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt1-4-T</expectedanswernote>
      </expected>
      <expected>
        <name>prt2</name>
        <expectedscore>0.8000000</expectedscore>
        <expectedpenalty>0.1000000</expectedpenalty>
        <expectedanswernote>prt2-2-T</expectedanswernote>
      </expected>
    </qtest>
  </question>
</quiz>
