<?xml version="1.0" encoding="UTF-8"?>
<quiz>
  <question type="stack">
    <name>
      <text>2.0.5 (Degree of polynomials)</text>
    </name>
    <questiontext format="html">
      <text><![CDATA[<p>The polynomial \(p(x)={@p@}\).</p><p></p><ul><li>\(p(x)\) has degree [[input:ans1]] [[validation:ans1]][[feedback:prt1]]</li><li>\(x^3p(x)\) has degree [[input:ans2]] [[validation:ans2]][[feedback:prt2]]</li><li>\(3p(x)\) has degree [[input:ans3]] [[validation:ans3]][[feedback:prt3]]</li><li>\(p(x)-{@an@}x^{@bigdeg@}\) has degree [[input:ans4]] [[validation:ans4]][[feedback:prt4]]</li><li>\(p(x)-{@an*x^deg@}\) has degree [[input:ans5]] [[validation:ans5]][[feedback:prt5]]</li></ul>]]></text>
    </questiontext>
    <generalfeedback format="html">
      <text><![CDATA[<p></p><ul><li>\(p(x)\) has degree {@ta1@} since that is the highest power of \(x\) which appears.</li><li>\(x^3p(x)\) has degree&nbsp;{@ta2@} since \(x^3\times{@an*x^deg@}={@an*x^(deg+3)@}\)</li><li>\(3p(x)\) has degree&nbsp;{@ta3@} since \(3\times{@an*x^deg@}={@3*an*x^(deg)@}\)</li><li>\(p(x)-{@an@}x^{@bigdeg@}\) has degree {@ta4@} since \(-{@an@}x^{@bigdeg@}\) will be the leading term and it is degree {@ta4@}</li><li>\(p(x)-{@an*x^deg@}\) has degree {@ta5@} since there is no {@x^deg@} term left, meaning {@ta5@} will be the highest remaining power of \(x\)</li></ul><p></p>]]></text>
    </generalfeedback>
    <defaultgrade>1</defaultgrade>
    <penalty>0.1</penalty>
    <hidden>0</hidden>
    <idnumber/>
    <stackversion>
      <text>2020070100</text>
    </stackversion>
    <questionvariables>
      <text><![CDATA[deg:rand([3,4,5]);
an:rand(delete(deg,[2,3,4])); /* make sure the leading coefficient is not the same as the degree, so we can detect if students are confusing them */
p:an*x^deg+apply("+",makelist(rand_with_prohib(-5,5,[0])*x^(k-1),k,deg));
bigdeg:rand_range(deg+1,7,1); /* must be bigger than deg for the question to make sense */
ta1: deg;
ta2: deg+3;
ta3: deg;
ta4: bigdeg;
ta5: deg-1;]]></text>
    </questionvariables>
    <specificfeedback format="html">
      <text/>
    </specificfeedback>
    <questionnote format="moodle_auto_format">
      <text>{@p@} and {#bigdeg#}</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>
<file name="tick.png" path="/" encoding="base64">iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAAigAAAIoBlCJR2wAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAHnSURBVDiNrdW/axNhHMfx9/e5gG0QMeAf0azmHCVeQBuSGwwh4KR/Q5Opk10KLrV/glLoUjhSpCmFFC8di0nWDk52cos61IT07uuQH70kQ3Lqd7p7+D6v5+Hhuc+JqjJfTstJ0EvmjWKjmlEhAyBKB5FOKLRJ3Zz5z/zb+bkyD2brbtrS8ACwF1aarXYg5vVF6eQqOmimMiI5r1i1NOyugAHYlobdnFesCiILoOMVthDdA9ZWwCaliO45XmFrBszW3TSiuzEggEMrSGwIfEV0N1t30wDGaTmJ8ZnF2dnho+D+m2bl0/WQMIvwzdLwwGk5CUMvmWe1M5vBjipHAYD1a9BT5Rqw6SXzxujfY85HZ00erB8LPAdAw4xBNTM36XscDNicNBgV20wu7bgurWC4oSLv4mIAKmRM5P3SCoabzUrzp19qbEfQlbDpLkXpjB7vLieAX2psK7yKg4nSkZxX2FH0LYDCF8y9F/7L+o/55mXYaL7umFBoT1eAJxIOms5x6WFcbASYjiF1cwZ3KGBLODh/2nBTsTBGCSSqOkmYLrNfS/eW0E1gPqyA9QMxjy9KJ1fT+Mp5xeo4HKL1G1hfgoFK7XO58R4iaeOXT/dRqQH9SOsyrI9KzS+f7k8G/nvALoDwb7+APy1h/QXTkPfjAAAAAElFTkSuQmCC</file>
    </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>numerical</type>
      <tans>ta1</tans>
      <boxsize>3</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>
    <input>
      <name>ans2</name>
      <type>numerical</type>
      <tans>ta2</tans>
      <boxsize>3</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>
    <input>
      <name>ans3</name>
      <type>numerical</type>
      <tans>ta3</tans>
      <boxsize>3</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>
    <input>
      <name>ans4</name>
      <type>numerical</type>
      <tans>ta4</tans>
      <boxsize>3</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>
    <input>
      <name>ans5</name>
      <type>numerical</type>
      <tans>ta5</tans>
      <boxsize>3</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>ta1</tans>
        <testoptions/>
        <quiet>0</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>
    <prt>
      <name>prt2</name>
      <value>1.0000000</value>
      <autosimplify>1</autosimplify>
      <feedbackstyle>1</feedbackstyle>
      <feedbackvariables>
        <text/>
      </feedbackvariables>
      <node>
        <name>0</name>
        <description/>
        <answertest>AlgEquiv</answertest>
        <sans>ans2</sans>
        <tans>ta2</tans>
        <testoptions/>
        <quiet>0</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/>
        </falsefeedback>
      </node>
    </prt>
    <prt>
      <name>prt3</name>
      <value>1.0000000</value>
      <autosimplify>1</autosimplify>
      <feedbackstyle>1</feedbackstyle>
      <feedbackvariables>
        <text/>
      </feedbackvariables>
      <node>
        <name>0</name>
        <description/>
        <answertest>AlgEquiv</answertest>
        <sans>ans3</sans>
        <tans>ta3</tans>
        <testoptions/>
        <quiet>0</quiet>
        <truescoremode>=</truescoremode>
        <truescore>1.0000000</truescore>
        <truepenalty/>
        <truenextnode>-1</truenextnode>
        <trueanswernote>prt3-1-T</trueanswernote>
        <truefeedback format="html">
          <text/>
        </truefeedback>
        <falsescoremode>=</falsescoremode>
        <falsescore>0.0000000</falsescore>
        <falsepenalty/>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>prt3-1-F</falseanswernote>
        <falsefeedback format="html">
          <text/>
        </falsefeedback>
      </node>
    </prt>
    <prt>
      <name>prt4</name>
      <value>1.0000000</value>
      <autosimplify>1</autosimplify>
      <feedbackstyle>1</feedbackstyle>
      <feedbackvariables>
        <text/>
      </feedbackvariables>
      <node>
        <name>0</name>
        <description/>
        <answertest>AlgEquiv</answertest>
        <sans>ans4</sans>
        <tans>ta4</tans>
        <testoptions/>
        <quiet>0</quiet>
        <truescoremode>=</truescoremode>
        <truescore>1.0000000</truescore>
        <truepenalty/>
        <truenextnode>-1</truenextnode>
        <trueanswernote>prt4-1-T</trueanswernote>
        <truefeedback format="html">
          <text/>
        </truefeedback>
        <falsescoremode>=</falsescoremode>
        <falsescore>0.0000000</falsescore>
        <falsepenalty/>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>prt4-1-F</falseanswernote>
        <falsefeedback format="html">
          <text/>
        </falsefeedback>
      </node>
    </prt>
    <prt>
      <name>prt5</name>
      <value>1.0000000</value>
      <autosimplify>1</autosimplify>
      <feedbackstyle>1</feedbackstyle>
      <feedbackvariables>
        <text/>
      </feedbackvariables>
      <node>
        <name>0</name>
        <description/>
        <answertest>AlgEquiv</answertest>
        <sans>ans5</sans>
        <tans>ta5</tans>
        <testoptions/>
        <quiet>0</quiet>
        <truescoremode>=</truescoremode>
        <truescore>1.0000000</truescore>
        <truepenalty/>
        <truenextnode>-1</truenextnode>
        <trueanswernote>prt5-1-T</trueanswernote>
        <truefeedback format="html">
          <text/>
        </truefeedback>
        <falsescoremode>=</falsescoremode>
        <falsescore>0.0000000</falsescore>
        <falsepenalty/>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>prt5-1-F</falseanswernote>
        <falsefeedback format="html">
          <text/>
        </falsefeedback>
      </node>
    </prt>
    <deployedseed>1323202774</deployedseed>
    <deployedseed>1231882889</deployedseed>
    <deployedseed>915887081</deployedseed>
    <deployedseed>251486606</deployedseed>
    <deployedseed>400110419</deployedseed>
    <deployedseed>862111598</deployedseed>
    <deployedseed>2098876627</deployedseed>
    <deployedseed>221890069</deployedseed>
    <deployedseed>435413170</deployedseed>
    <deployedseed>1179931504</deployedseed>
    <deployedseed>1871052474</deployedseed>
    <deployedseed>1267471634</deployedseed>
    <deployedseed>1773510264</deployedseed>
    <deployedseed>407488321</deployedseed>
    <deployedseed>1126894035</deployedseed>
    <deployedseed>35208892</deployedseed>
    <deployedseed>388606202</deployedseed>
    <deployedseed>1854385700</deployedseed>
    <deployedseed>373460115</deployedseed>
    <deployedseed>1121128628</deployedseed>
    <deployedseed>273756215</deployedseed>
    <deployedseed>826809848</deployedseed>
    <deployedseed>217460753</deployedseed>
    <deployedseed>292119452</deployedseed>
    <deployedseed>975273404</deployedseed>
    <deployedseed>1635754776</deployedseed>
    <deployedseed>2115947554</deployedseed>
    <deployedseed>1163880876</deployedseed>
    <deployedseed>75750128</deployedseed>
    <deployedseed>1500588431</deployedseed>
    <deployedseed>831062319</deployedseed>
    <deployedseed>1469490053</deployedseed>
    <deployedseed>353825147</deployedseed>
    <deployedseed>1585923610</deployedseed>
    <deployedseed>137298860</deployedseed>
    <deployedseed>1353662423</deployedseed>
    <deployedseed>1413743932</deployedseed>
    <deployedseed>31095180</deployedseed>
    <deployedseed>1521142628</deployedseed>
    <deployedseed>761036161</deployedseed>
    <deployedseed>525562602</deployedseed>
    <deployedseed>1050525142</deployedseed>
    <deployedseed>702881465</deployedseed>
    <deployedseed>1386837083</deployedseed>
    <deployedseed>1867814640</deployedseed>
    <deployedseed>2114171769</deployedseed>
    <deployedseed>1673625169</deployedseed>
    <deployedseed>269407225</deployedseed>
    <deployedseed>1408611352</deployedseed>
    <deployedseed>2030408583</deployedseed>
    <deployedseed>388928129</deployedseed>
    <deployedseed>1112966346</deployedseed>
    <deployedseed>1962106486</deployedseed>
    <deployedseed>34878482</deployedseed>
    <deployedseed>427500757</deployedseed>
    <deployedseed>2083812724</deployedseed>
    <deployedseed>139115110</deployedseed>
    <deployedseed>978643997</deployedseed>
    <deployedseed>1985609458</deployedseed>
    <deployedseed>1167585737</deployedseed>
    <qtest>
      <testcase>1</testcase>
      <description/>
      <testinput>
        <name>ans1</name>
        <value>ta1</value>
      </testinput>
      <testinput>
        <name>ans2</name>
        <value>ta2</value>
      </testinput>
      <testinput>
        <name>ans3</name>
        <value>ta3</value>
      </testinput>
      <testinput>
        <name>ans4</name>
        <value>ta4</value>
      </testinput>
      <testinput>
        <name>ans5</name>
        <value>ta5</value>
      </testinput>
      <expected>
        <name>prt1</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt1-1-T</expectedanswernote>
      </expected>
      <expected>
        <name>prt2</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt2-1-T</expectedanswernote>
      </expected>
      <expected>
        <name>prt3</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt3-1-T</expectedanswernote>
      </expected>
      <expected>
        <name>prt4</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt4-1-T</expectedanswernote>
      </expected>
      <expected>
        <name>prt5</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt5-1-T</expectedanswernote>
      </expected>
    </qtest>
  </question>
</quiz>
