带答案的多项选择题

带答案的多项选择题

我正在写与 MCQ 相关的试卷,并遵循解决方案

该解决方案会记住答案并将其显示为列表(如果提供)。它运行完美。

试卷还包括判断题和填空题。

我正在使用以下代码。

%%%%%%%%%%% TRUE or FALSE %%%%%%%%%%%%%
\newcommand*\TrueFalse{TRUE\hspace*{8pt} FALSE\hspace*{8pt}}
\newlength\mylena
\newlength\mylenb
\settowidth\mylena{\TrueFalse}
\newcommand\TF[1]{%
    \setlength\mylenb{\linewidth}
    \addtolength\mylenb{-\mylena}
    \parbox[t]{\mylena}{\TrueFalse}\parbox[t]{\mylenb}{#1}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

我需要这个 TRUE FALSE 像解决方案一样工作,也就是说,它记住每个问题的答案并且答案可以在最后显示。

判断题的一个简短示例是,

\documentclass[10pt,a4paper]{exam}
%%%%%%%%%%% TRUE or FALSE %%%%%%%%%%%%%
\newcommand*\TrueFalse{TRUE\hspace*{8pt} FALSE\hspace*{8pt}}
\newlength\mylena
\newlength\mylenb
\settowidth\mylena{\TrueFalse}
\newcommand\TF[1]{%
    \setlength\mylenb{\linewidth}
    \addtolength\mylenb{-\mylena}
    \parbox[t]{\mylena}{\TrueFalse}\parbox[t]{\mylenb}{#1}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}
\begin{questions}
\question\TF{The types of statistical inferences are estimation of parameters and testing of hypotheses.}

\question\TF{The types of statistical estimation of parameters are point estimation and interval estimation.}

\question\TF{Point estimators may be more useful than interval estimators because probability statements are attached to point estimates.}

\question\TF{The types of statistical inferences are an estimation of parameters and testing of hypotheses.}
\end{questions}
\end{document}

填空题的一个实际示例是

\documentclass[10pt,a4paper]{exam}
\newcommand{\uline}[1]{\rule[0pt]{#1}{0.4pt}}
\usepackage{tasks}
\begin{document}
\begin{enumerate}
    \item A point estimator is a \uline{1in} variable whereas an estimate is a constant.
    \item A point estimator is a \uline{1in} variable whereas an estimate is a constant.
    \item A point estimator is a \uline{1in} variable whereas an estimate is a constant.
\end{enumerate}
\bigskip
Answer Key:
\begin{tasks}[counter-format={tsk[1].}](5)
    \task random        \task random
\end{tasks}
\end{document}

如果可以对编译内容的最终输出进行任何可能的增强,也请提供帮助。

相关内容