<?xml version="1.0" encoding="UTF-8"?>
<!-- NumDecPlaces and NumSigFigs: 0.125 rounded: a minimal reproduction for the STACK question type (moodle-qtype_stack). -->
<!-- Andrey Chesnokov, 2026. Licence: CC BY-SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/). -->
<quiz>
<question type="stack">
  <name><text>NumDecPlaces and NumSigFigs: 0.125 rounded</text></name>
  <questiontext format="html"><text><![CDATA[<p>Round \({@a@}\) to two decimal places: [[input:ans1]] [[validation:ans1]] [[feedback:prt1]]</p><p>Round \({@a@}\) to two significant figures: [[input:ans2]] [[validation:ans2]] [[feedback:prt2]]</p>]]></text></questiontext>
  <generalfeedback format="html"><text></text></generalfeedback>
  <defaultgrade>1</defaultgrade>
  <penalty>0.1</penalty>
  <hidden>0</hidden>
  <idnumber></idnumber>
  <stackversion><text>2026080600</text></stackversion>
  <questionvariables><text>a: 0.125;</text></questionvariables>
  <specificfeedback format="html"><text></text></specificfeedback>
  <questionnote format="html"><text></text></questionnote>
  <questionsimplify>1</questionsimplify>
  <assumepositive>0</assumepositive>
  <assumereal>0</assumereal>
  <input>
    <name>ans1</name>
    <type>algebraic</type>
    <tans>decimalplaces(a,2)</tans>
    <boxsize>20</boxsize>
    <strictsyntax>1</strictsyntax>
    <insertstars>0</insertstars>
    <syntaxhint></syntaxhint>
    <syntaxattribute>0</syntaxattribute>
    <forbidwords></forbidwords>
    <allowwords></allowwords>
    <forbidfloat>0</forbidfloat>
    <requirelowestterms>0</requirelowestterms>
    <checkanswertype>0</checkanswertype>
    <mustverify>1</mustverify>
    <showvalidation>1</showvalidation>
    <options></options>
  </input>
  <input>
    <name>ans2</name>
    <type>algebraic</type>
    <tans>significantfigures(a,2)</tans>
    <boxsize>20</boxsize>
    <strictsyntax>1</strictsyntax>
    <insertstars>0</insertstars>
    <syntaxhint></syntaxhint>
    <syntaxattribute>0</syntaxattribute>
    <forbidwords></forbidwords>
    <allowwords></allowwords>
    <forbidfloat>0</forbidfloat>
    <requirelowestterms>0</requirelowestterms>
    <checkanswertype>0</checkanswertype>
    <mustverify>1</mustverify>
    <showvalidation>1</showvalidation>
    <options></options>
  </input>
  <prt>
    <name>prt1</name>
    <value>1.0000000</value>
    <autosimplify>1</autosimplify>
    <feedbackstyle>1</feedbackstyle>
    <feedbackvariables><text></text></feedbackvariables>
    <node>
      <name>0</name>
      <answertest>NumDecPlaces</answertest>
      <sans>ans1</sans>
      <tans>a</tans>
      <testoptions>2</testoptions>
      <quiet>0</quiet>
      <truescoremode>=</truescoremode>
      <truescore>1</truescore>
      <truepenalty></truepenalty>
      <truenextnode>-1</truenextnode>
      <trueanswernote>prt1-1-T</trueanswernote>
      <truefeedback format="html"><text></text></truefeedback>
      <falsescoremode>=</falsescoremode>
      <falsescore>0</falsescore>
      <falsepenalty></falsepenalty>
      <falsenextnode>-1</falsenextnode>
      <falseanswernote>prt1-1-F</falseanswernote>
      <falsefeedback format="html"><text></text></falsefeedback>
    </node>
  </prt>
  <prt>
    <name>prt2</name>
    <value>1.0000000</value>
    <autosimplify>1</autosimplify>
    <feedbackstyle>1</feedbackstyle>
    <feedbackvariables><text></text></feedbackvariables>
    <node>
      <name>0</name>
      <answertest>NumSigFigs</answertest>
      <sans>ans2</sans>
      <tans>a</tans>
      <testoptions>2</testoptions>
      <quiet>0</quiet>
      <truescoremode>=</truescoremode>
      <truescore>1</truescore>
      <truepenalty></truepenalty>
      <truenextnode>-1</truenextnode>
      <trueanswernote>prt2-1-T</trueanswernote>
      <truefeedback format="html"><text></text></truefeedback>
      <falsescoremode>=</falsescoremode>
      <falsescore>0</falsescore>
      <falsepenalty></falsepenalty>
      <falsenextnode>-1</falsenextnode>
      <falseanswernote>prt2-1-F</falseanswernote>
      <falsefeedback format="html"><text></text></falsefeedback>
    </node>
  </prt>
  <qtest>
    <testcase>1</testcase>
    <description>The same rounding rule in both tests (here: half up, as significantfigures).</description>
    <testinput>
      <name>ans1</name>
      <value>0.13</value>
    </testinput>
    <testinput>
      <name>ans2</name>
      <value>0.13</value>
    </testinput>
    <expected>
      <name>prt1</name>
      <expectedscore>1</expectedscore>
      <expectedpenalty>0</expectedpenalty>
      <expectedanswernote>prt1-1-T</expectedanswernote>
    </expected>
    <expected>
      <name>prt2</name>
      <expectedscore>1</expectedscore>
      <expectedpenalty>0</expectedpenalty>
      <expectedanswernote>prt2-1-T</expectedanswernote>
    </expected>
  </qtest>
</question>
</quiz>
