Blanks Questions in LaTeX

Question Mode: Blanks - [menu] option

 

The Blanks question type generates a fill-in-the-blank question. The text inside a \blank[menu] command is removed and a list of choices is displayed in a drop-down box.

Notes

For example,

'$x = \blank[menu]{0,1,2}$'

converts correctly, but

'$$x = \blank[menu]{0,1,2}$$'

 and

'$\int_0^{\blank[menu]{1,2}} f(x)\,dx$'

generate conversion errors.

 

Example 1

\begin{question}{Blanks}
\qutext{The
% Format: \blank[menu]{correct choice, other choices}
\blank[menu]{human, canada goose, garter snake, housefly} and
\blank[menu]{chimpanzee, emu, frog, electric blue hap} are mammals.}
\end{question}

 

Example 2

\begin{question}{Blanks}
% This question mixes the [menu] and [formula] options.
\qutext{The graph of the function $f(x)=(x-3)^2$ is the same as the
graph of $g(x)=x^2$ shifted to the \blank[menu]{right, left}
\blank[formula]{3} units.}
\end{question}

 

Example 3

\begin{question}{Blanks}
% This question uses randomized variables.
\qutext{The graph of the function
$f(x)=\var{s1}\var{a}(x+\var{h})^2-\var{k}$ is the same as the graph of
the function $g(x)=\var{s1}\var{a}x^2$ shifted
\blank[menu]{to the left \var{h} units,to the right \var{h} units,
up \var{h} units,down \var{h} units}
and shifted \blank[menu]{down \var{k} units,up \var{k} units,
to the right \var{k} units, to the left \var{k} units}.}
\code{
$t1=rint(2);
$s1=if($t1,"","-");
$a=int(rint(8)+2);
$h=int(rint(8)+2);
$k=int(rint(8)+2);
}
% The above code selects random integer coefficients between 2 and 9,
% and allows the leading coefficient of the function f to be either
% positive or negative.
\end{question}

 

Example 4

\begin{question}{blanks}
% This question uses randomized variables in the menu choices and
% other parts of the question.
\qutext{In the \var{q} quadrant, the graph of $y=\var{c}(\var{a1})^x$ is
\blank[menu]{\var{p1},\var{p2}} the graph of $y=\var{c}(\var{a2})^x$.}
\code{
$r=rint(2);
$s=rint(2);
$t=int(rint(8)+2);
$q=switch($r,"first","second");
$p1=switch($r+$s,"above","below","above");
$p2=switch($r+$s,"below","above","below");
$c=int(rand(2,30));
$a=rand(1.1,12.1,2);
$a1=switch($s,$a+$t,$a);
$a2=switch($s,$a,$a+$t);
}
\end{question}