2

I am writing MCQs related question paper and followed the solution.

The solution remembers the answers and displays them as a list where provided. It works perfectly.

The examination papers include TRUE and FALSE and FILL in the blanks questions too.

I am using following code.

%%%%%%%%%%% 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}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

I need that this TRUE FALSE work like the solution, that is, it remembers the answers of each question and answers can be displayed at the end.

A short working example for TRUE FALSE questions is,

\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}

A working example for FILL in the blanks is

\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}

Please also help, if any possible enhancement can be done in the final output of compiled content.

  • Yesterday you said you don't want to use any package designed to do exams. My question is: Why not and reinvent the wheel? – Johannes_B May 4 '18 at 4:53
  • @Johannes_B: I do remember that I did not say that I don't want to use any package designed to do exams. In these two days, I asked for questions and both of questions are using exam package. I need the solution either with the package or with some now code. I am also learning the LaTex programming it is relatively difficult. However, accept my apologies if I said like that you asked. – itfeature.com May 4 '18 at 5:11
  • Sorry, just noticed i confused you with another user. My bad. Sorry. – Johannes_B May 4 '18 at 5:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.