Multipart Question Example Script

Multipart questions can consist of any combination of questions as parts, including nested multipart questions.

 

The following example script creates a Multipart question that contains a nested Multipart question.

 

qu.1.topic=Multipart Question Example Script@

qu.1.1.mode=Multipart@
qu.1.1.name=<b>Full multipart question featuring nested multipart</b>@
qu.1.1.editing=useHTML@
qu.1.1.algorithm=
$n=int(rand(5,15));
$a=int(rand(1,10));
$nminus = int($n - 1);
$nplus = int($n + 1);
$isEven=int(eq($n/2, int($n/2)));
$k=if($isEven, 1, 3);
$type=if($isEven, "even", "odd");
$othertype=if($isEven, "odd", "even");
@
qu.1.1.question=
  This question concerns the integral of the function
  <math>
  <msup>
  <mi>x</mi>
  <mn>$n</mn>
  </msup>
  </math>.
@
qu.1.1.weighting=1,1,1@
qu.1.1.numbering=alpha@
qu.1.1.part.1.question=
  In the first part, use a geometric argument to decide whether
  <math>
  <msubsup>
  <mo>&Integral;</mo>
  <mn>-$a</mn>
  <mn>$a</mn>
  </msubsup>
  <msup><mi>x</mi><mn>$n</mn></msup> <mi>dx</mi>
  </math> is:
@
qu.1.1.part.1.editing=useHTML@
qu.1.1.part.1.answer=$k@
qu.1.1.part.1.mode=Multiple Choice@
qu.1.1.part.1.choice.3=zero@
qu.1.1.part.1.choice.2=negative@
qu.1.1.part.1.choice.1=positive@
qu.1.1.part.2.part.2.question=
  Use the indefinite integral above to compute
  <math>
  <msubsup>
  <mo>&Integral;</mo>
  <mn>-$a</mn>
  <mn>$a</mn>
  </msubsup>
  <msup><mi>x</mi><mn>$n</mn></msup> <mi>dx</mi>
  </math>
@
qu.1.1.part.2.weighting=1,1@
qu.1.1.part.2.question=
  In the second part, check your answer by computing the integral.
@
qu.1.1.part.2.editing=useHTML@
qu.1.1.part.2.numbering=roman@
qu.1.1.part.2.part.1.mode=Formula Mod C@
qu.1.1.part.2.part.2.mode=Formula@
qu.1.1.part.2.part.1.editing=useHTML@
qu.1.1.part.2.part.2.answer=($a^$nplus - (-$a)^$nplus) / $nplus@
qu.1.1.part.2.mode=Multipart@
qu.1.1.part.2.part.2.editing=useHTML@
qu.1.1.part.2.part.1.question=
  Evaluate
  <math>
  <mo>&Integral;</mo> <msup><mi>x</mi><mn>$n</mn></msup> <mi>dx</mi>
  </math>.
@
qu.1.1.part.2.part.1.answer=x^$nplus / $nplus@
qu.1.1.part.3.question=
  The geometric argument in the first part was based on the fact that
  <math>
  <msup>
  <mi>x</mi>
  <mn>$n</mn>

  </msup>
  </math> is an <1> function.
@
qu.1.1.part.3.extra=$othertype@
qu.1.1.part.3.editing=useHTML@
qu.1.1.part.3.blank.1=$type@
qu.1.1.part.3.mode=Complete Sentence@

 

See Also:

Multipart Questions

Using Script Files to Author Questions