<?xml version="1.0" encoding="UTF-8"?>
<quiz>
  <question type="stack">
    <name>
      <text>2.5.1.10 Function with the steepest gradient</text>
    </name>
    <questiontext format="html">
      <text><![CDATA[<p class="HELM_exercise">Exercise</p><p>Select which of the following functions has the steepest gradient.</p>
 [[input:ans1]] [[validation:ans1]][[feedback:prt1]]]]></text>
    </questiontext>
    <generalfeedback format="html">
      <text><![CDATA[<p>We comparing the factors/coefficient of the independent variable in each case. This value is the gradient and highest value shows which function has the steepest gradient.</p><p>Hence, in this case the function with the steepest gradient is \(\displaystyle{@f3@}\).</p>]]></text>
    </generalfeedback>
    <defaultgrade>1</defaultgrade>
    <penalty>0.1</penalty>
    <hidden>0</hidden>
    <idnumber/>
    <stackversion>
      <text>2020120600</text>
    </stackversion>
    <questionvariables>
      <text><![CDATA[var: x;
rand1: rand_with_step(13, 19, 1);
rand2: rand_with_step(-7, 1, 1);
rand3: rand_with_step(2, 3, 1);
f1: (rand1*var+rand2)/rand3;
rand4: rand_with_prohib(-9, 4, [0]);
rand5: rand_with_step(-8, 8, 1);
f2: rand4*var+rand5;
f3: (rand1*var+rand2);
f4: rand1+rand3;
rand6: rand_with_prohib(-10, 4, [0]);
rand7: rand1/rand3;
f5: var*rand7;
f6: var*(sqrt(rand1))+rand1;

corbase:[f3];
wrongbase: [f1, f2,f4,f5,f6];
mcq:multiselqn(corbase, 1, wrongbase, 3);

/*sel_cor: maplist(lambda([ex], [ex, true]), rand_selection(corbase, 1));  */
/*sel_incorr: maplist(lambda([ex], [ex, false]), rand_selection(wrongbase, 3)); */
/*opts: random_permutation(append(sel_cor,sel_incorr)); */
/*talab: ev(makelist(sconcat("(",ascii(96+i),")"), i, 1, length(opts)), simp); */
/*ta1:zip_with(lambda([ex1, ex2], [ex1, ex2[2], sconcat("<b>", ex1, "</b> ", ex2[1])]), talab, opts);*/
/*version: map(first, opts); */
ta1:mcq[1];
version:mcq[2];
corr1:mcq_correct(ta1);
incorr1:mcq_incorrect(ta1);]]></text>
    </questionvariables>
    <specificfeedback format="html">
      <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>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>setify(ans1)</sans>
        <tans>setify(corr1)</tans>
        <testoptions/>
        <quiet>0</quiet>
        <truescoremode>=</truescoremode>
        <truescore>1.0000000</truescore>
        <truepenalty/>
        <truenextnode>-1</truenextnode>
        <trueanswernote>prt1-1-T</trueanswernote>
        <truefeedback format="html">
          <text><![CDATA[<p>You have correctly identified the correct answer.<br></p>]]></text>
        </truefeedback>
        <falsescoremode>=</falsescoremode>
        <falsescore>0.0000000</falsescore>
        <falsepenalty/>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>prt1-1-F</falseanswernote>
        <falsefeedback format="html">
          <text><![CDATA[The correct answer is \({@setdifference(setify(corr1),setify(ans1))@}\).<br>]]></text>
        </falsefeedback>
      </node>
    </prt>
    <deployedseed>964521075</deployedseed>
    <deployedseed>852661942</deployedseed>
    <deployedseed>650114435</deployedseed>
    <deployedseed>825489774</deployedseed>
    <deployedseed>1863384210</deployedseed>
    <deployedseed>72249967</deployedseed>
    <deployedseed>1504329167</deployedseed>
    <deployedseed>1616562539</deployedseed>
    <deployedseed>1225750938</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-1-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-1-F</expectedanswernote>
      </expected>
    </qtest>
  </question>
</quiz>
