<?xml version="1.0" encoding="UTF-8"?>
<quiz>
  <question type="stack">
    <name>
      <text>15.2.1.8 COM of point masses in plane</text>
    </name>
    <questiontext format="html">
      <text><![CDATA[<p class="HELM_exercise">Exercise</p>
<p>Masses of \({@m1@} \, \mathrm{kg}, {@m2@} \, \mathrm{kg}\) and \({@m3@} \, \mathrm{kg}\) are located at the points \(({@x1@},{@y1@}), ({@x2@},{@y2@})\) and \(({@x3@},{@y3@})\) respectively. Find the coordinates of their centre of mass.</p><p></p> <b>Give your answer to 2 decimal places.</b><p></p><p>\(\bar{x}=\) [[input:ans1]] [[validation:ans1]] [[feedback:prt1]]</p><p>\(\bar{y}=\) [[input:ans2]] [[validation:ans2]] [[feedback:prt2]]</p>]]></text>
    </questiontext>
    <generalfeedback format="html">
      <text><![CDATA[<p>\[\bar{x}=\dfrac{\sum_{i=1}^3 m_i x_i}{\sum_{i=1}^3m_i}=\dfrac{{@m1@}\times({@x1@}) + {@m2@}\times({@x2@}) + {@m3@}\times({@x3@})}{{@m1@}+{@m2@}+{@m3@}} \approx {@xbar@}\]</p>
<p>\[\bar{y}=\dfrac{\sum_{i=1}^3 m_i y_i}{\sum_{i=1}^3m_i}=\dfrac{{@m1@}\times({@y1@}) + {@m2@}\times({@y2@}) + {@m3@}\times({@y3@})}{{@m1@}+{@m2@}+{@m3@}} \approx {@ybar@}\]</p>
<p>Hence the centre of mass is located at the point \(({@xbar@},{@ybar@})\). </p>]]></text>
    </generalfeedback>
    <defaultgrade>1</defaultgrade>
    <penalty>0.1</penalty>
    <hidden>0</hidden>
    <idnumber/>
    <stackversion>
      <text>2020120600</text>
    </stackversion>
    <questionvariables>
      <text>m1 : 1+rand(4);
m2 : rand_with_prohib(1,5,[m1]);
m3 : rand_with_prohib(1,10,[m1,m3]);
tm : m1 + m2 + m3;
x1 : rand_with_prohib(-5,5,[0]);
x2 : rand_with_prohib(-5,5,[0,x1]);
x3 : rand_with_prohib(-5,5,[0,x1,x2]);
y1 : rand_with_prohib(-5,5,[0,x1]);
y2 : rand_with_prohib(-5,5,[0]);
y3 : rand_with_prohib(-5,5,[0]);
xbar : decimalplaces((m1*x1 + m2*x2 + m3*x3)/tm,2);
xbar: dispdp(xbar,2);
ybar : decimalplaces((m1*y1 + m2*y2 + m3*y3)/tm,2);
ybar: dispdp(ybar,2);</text>
    </questionvariables>
    <specificfeedback format="html">
      <text/>
    </specificfeedback>
    <questionnote format="moodle_auto_format">
      <text>masses: {@m1@},{@m2@},{@m3@} points: ({@x1@},{@y1@}), ({@x2@},{@y2@}), ({@x3@},{@y3@}) so \( \bar{x} = {@xbar@}, \,  \bar{y} = {@ybar@}\)</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>dot</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>xbar</tans>
      <boxsize>5</boxsize>
      <strictsyntax>1</strictsyntax>
      <insertstars>0</insertstars>
      <syntaxhint/>
      <syntaxattribute>0</syntaxattribute>
      <forbidwords/>
      <allowwords/>
      <forbidfloat>0</forbidfloat>
      <requirelowestterms>0</requirelowestterms>
      <checkanswertype>0</checkanswertype>
      <mustverify>1</mustverify>
      <showvalidation>3</showvalidation>
      <options/>
    </input>
    <input>
      <name>ans2</name>
      <type>numerical</type>
      <tans>ybar</tans>
      <boxsize>5</boxsize>
      <strictsyntax>1</strictsyntax>
      <insertstars>0</insertstars>
      <syntaxhint/>
      <syntaxattribute>0</syntaxattribute>
      <forbidwords/>
      <allowwords/>
      <forbidfloat>0</forbidfloat>
      <requirelowestterms>0</requirelowestterms>
      <checkanswertype>0</checkanswertype>
      <mustverify>1</mustverify>
      <showvalidation>3</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>NumDecPlaces</answertest>
        <sans>ans1</sans>
        <tans>xbar</tans>
        <testoptions>2</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>NumDecPlaces</answertest>
        <sans>ans2</sans>
        <tans>ybar</tans>
        <testoptions>2</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>
    <deployedseed>298324655</deployedseed>
    <deployedseed>1637229811</deployedseed>
    <deployedseed>1441139073</deployedseed>
    <deployedseed>1508697620</deployedseed>
    <deployedseed>1912249621</deployedseed>
    <deployedseed>1236317958</deployedseed>
    <deployedseed>167042207</deployedseed>
    <deployedseed>1062846135</deployedseed>
    <deployedseed>1951459480</deployedseed>
    <deployedseed>662511115</deployedseed>
    <deployedseed>1294799699</deployedseed>
    <deployedseed>891096285</deployedseed>
    <deployedseed>1751249389</deployedseed>
    <deployedseed>1894575885</deployedseed>
    <deployedseed>1828379290</deployedseed>
    <qtest>
      <testcase>1</testcase>
      <description/>
      <testinput>
        <name>ans1</name>
        <value>xbar</value>
      </testinput>
      <testinput>
        <name>ans2</name>
        <value>ybar</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>
    </qtest>
    <qtest>
      <testcase>2</testcase>
      <description/>
      <testinput>
        <name>ans1</name>
        <value>0</value>
      </testinput>
      <testinput>
        <name>ans2</name>
        <value>0</value>
      </testinput>
      <expected>
        <name>prt1</name>
        <expectedscore>0.0000000</expectedscore>
        <expectedpenalty>0.1000000</expectedpenalty>
        <expectedanswernote>prt1-1-F</expectedanswernote>
      </expected>
      <expected>
        <name>prt2</name>
        <expectedscore>0.0000000</expectedscore>
        <expectedpenalty>0.1000000</expectedpenalty>
        <expectedanswernote>prt2-1-F</expectedanswernote>
      </expected>
    </qtest>
  </question>
</quiz>
