<?xml version="1.0" encoding="UTF-8"?>
<!-- Authored by the CTM team. CC BY-SA 4.0. -->
<quiz>
  <question type="stack">
    <name>
      <text>Boolean equivalence</text>
    </name>
    <questiontext format="html">
      <text>&lt;p&gt;Rewrite the negation of &lt;code&gt;a and b&lt;/code&gt; using &lt;code&gt;or&lt;/code&gt;. Here a and b are propositions.&lt;/p&gt;&lt;p&gt;[[input:ans]] [[validation:ans]] [[feedback:prt1]]&lt;/p&gt;</text>
    </questiontext>
    <generalfeedback format="html">
      <text>&lt;p&gt;A reference answer is \({@ta@}\).&lt;/p&gt;</text>
    </generalfeedback>
    <defaultgrade>1</defaultgrade>
    <penalty>0.1</penalty>
    <hidden>0</hidden>
    <idnumber />
    <stackversion>
      <text>2021072200</text>
    </stackversion>
    <questionvariables>
      <text>ta:not(a and b);</text>
    </questionvariables>
    <specificfeedback format="html">
      <text>&lt;p&gt;[[feedback:prt1]]&lt;/p&gt;</text>
    </specificfeedback>
    <questionnote format="moodle_auto_format">
      <text>Boolean equivalence</text>
    </questionnote>
    <questiondescription format="moodle_auto_format">
      <text />
    </questiondescription>
    <questionsimplify>1</questionsimplify>
    <assumepositive>0</assumepositive>
    <assumereal>0</assumereal>
    <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>ans</name>
      <type>algebraic</type>
      <tans>ta</tans>
      <boxsize>18</boxsize>
      <strictsyntax>1</strictsyntax>
      <insertstars>0</insertstars>
      <syntaxhint />
      <syntaxattribute>0</syntaxattribute>
      <forbidwords />
      <allowwords />
      <forbidfloat>1</forbidfloat>
      <requirelowestterms>0</requirelowestterms>
      <checkanswertype>1</checkanswertype>
      <mustverify>1</mustverify>
      <showvalidation>1</showvalidation>
      <options />
    </input>
    <prt>
      <name>prt1</name>
      <value>1.0000000</value>
      <autosimplify>0</autosimplify>
      <feedbackstyle>1</feedbackstyle>
      <feedbackvariables>
        <text />
      </feedbackvariables>
      <node>
        <name>0</name>
        <description />
        <answertest>AlgEquiv</answertest>
        <sans>ans</sans>
        <tans>ta</tans>
        <testoptions />
        <quiet>0</quiet>
        <truescoremode>=</truescoremode>
        <truescore>1.0000000</truescore>
        <truepenalty />
        <truenextnode>-1</truenextnode>
        <trueanswernote>prt1-0-T</trueanswernote>
        <truefeedback format="html">
          <text>&lt;p&gt;Correct.&lt;/p&gt;</text>
        </truefeedback>
        <falsescoremode>=</falsescoremode>
        <falsescore>0.0000000</falsescore>
        <falsepenalty />
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>prt1-0-F</falseanswernote>
        <falsefeedback format="html">
          <text>&lt;p&gt;This answer is not equivalent to the reference.&lt;/p&gt;</text>
        </falsefeedback>
      </node>
    </prt>
    <deployedseed>17</deployedseed>
    <deployedseed>29</deployedseed>
    <deployedseed>47</deployedseed>
    <qtest>
      <testcase>1</testcase>
      <description>Equivalent answer</description>
      <testinput>
        <name>ans</name>
        <value>not a or not b</value>
      </testinput>
      <expected>
        <name>prt1</name>
        <expectedscore>1</expectedscore>
        <expectedpenalty>0</expectedpenalty>
        <expectedanswernote>prt1-0-T</expectedanswernote>
      </expected>
    </qtest>
    <qtest>
      <testcase>2</testcase>
      <description>Equivalent answer</description>
      <testinput>
        <name>ans</name>
        <value>nounnot(a) nounor nounnot(b)</value>
      </testinput>
      <expected>
        <name>prt1</name>
        <expectedscore>1</expectedscore>
        <expectedpenalty>0</expectedpenalty>
        <expectedanswernote>prt1-0-T</expectedanswernote>
      </expected>
    </qtest>
    <qtest>
      <testcase>3</testcase>
      <description>Equivalent answer</description>
      <testinput>
        <name>ans</name>
        <value>not(a and b)</value>
      </testinput>
      <expected>
        <name>prt1</name>
        <expectedscore>1</expectedscore>
        <expectedpenalty>0</expectedpenalty>
        <expectedanswernote>prt1-0-T</expectedanswernote>
      </expected>
    </qtest>
    <qtest>
      <testcase>4</testcase>
      <description>Incorrect candidate</description>
      <testinput>
        <name>ans</name>
        <value>not a and not b</value>
      </testinput>
      <expected>
        <name>prt1</name>
        <expectedscore>0</expectedscore>
        <expectedpenalty>0.1</expectedpenalty>
        <expectedanswernote>prt1-0-F</expectedanswernote>
      </expected>
    </qtest>
  </question>
</quiz>
