0

I'm using the exam class. I would like to modify the grade table so that instead of "Question" it would read "Domanda", instead of "Score" it would read "Punteggio". For the moment, I obtain something like this: enter image description here

Moreover, I would like an extra column to appear with the name "Bonus redaction". I enclose here my code.

\documentclass[letterpaper,12pt,addpoints]{exam}
\usepackage[utf8]{inputenc}
\usepackage[french]{babel}
\usepackage[top=1in, bottom=1in, left=0.75in, right=0.75in]{geometry}
\usepackage{amsmath,amssymb}
\newcommand{\university}{Gymnase de}
\newcommand{\faculty}{Cours de }
\newcommand{\class}{1C}
\newcommand{\examnum}{Test n}
\newcommand{\content}{Calcul }
\newcommand{\examdate}{Villeneuve sur France, 13 novembre 2023}
\newcommand{\timelimit}{45 minutes}

\pagestyle{headandfoot}
\firstpageheader{}{}{}
\firstpagefooter{}{Page \thepage\ of \numpages}{}
\runningheader{\class}{\examnum}{\examdate}
\runningheadrule
\runningfooter{}{Page \thepage\ of \numpages}{}

\begin{document}

\title{\Large \textbf{\university\\ \faculty\\
        \bigskip
        \class -- \examnum \\ \content}}
\author{Enseignant: Ciao Ciao}
\date{\examdate}
\maketitle
\begin{flushleft}
    \makebox[12cm]{\textbf{Pr\'enom et nom}:\ \hrulefill}
\end{flushleft}
\noindent \rule{\textwidth}{1pt}
\begin{itemize}
\item \textbf{Durée:} 45 minutes\\
\item \textbf{Matériel autorisé:} Formulaire officiel non annot\'e  \\
\begin{center}
\textbf{Distribution des points}\\
\medskip
\gradetable[h][questions]
\end{center}
\end{itemize}
\clearpage
\begin{questions}
    \question



    \clearpage
    \question
    The \textit{pmf} of the amount of memory \textit{X} (GB) in a purchased flash drive was given as
    \begin{center}
        \begin{tabular}{c|c|c|c|c|c} 
            $x$ & 1 & 2 & 4 & 8 & 16 \\
            \hline
            $p(x)$ & 0.05 & 0.10 & 0.35 & 0.40 & 0.10\\  
        \end{tabular}
    \end{center}
    Compute the following:
    \begin{parts}
        \part[2] Expected value $E(X)$
        \part[2] Variance $V(X)$ directly from the definition
        \part[2] The standard deviation $\sigma(X)$
        \part[2] $V(X)$ using the shortcut formula ($V(X)=E(X^2)-E^2(X)$)
    \end{parts}
    
    \clearpage
    \question Each of 12 refrigerators of a certain type has been returned to a distributor because of the presence of a high-pitched oscillating noise when the refrigerator is running. Suppose that 5 of these 12 have defective compressors and the other 7 have less serious problems. If they are examined in random order, let X = the number among the first 6 examined that have a defective compressor. Compute the following:
    \begin{parts}
        \part[3] $P(X=1)$
        \part[3] $P(X \geq 4)$
    \end{parts}
    
    \clearpage
    \question A reservation service employs five information operators who receive requests for information independently of one another, each according to a Poisson process with rate $\mu=2$ per minute.
    \begin{parts}
        \part[4] What is the probability that during a given 1-min period, the first operator receives no requests?
        \part[4] What is the probability that during a given 1-min period, exactly four of the five operators receive no requests?(\textit{Hint}: treat either as a binomial process of 5 trials with 4 successes or consider 5 combinations of Poisson processes, e.g. only 1st operation receives a request  or only 2nd operation receives a request and so on)
    \end{parts}
    
\end{questions}

\clearpage
This page is intentionally left blank to accommodate work that wouldn't fit elsewhere and/or scratch work.
\end{document}

2 Answers 2

2

Define a new grade table by yourself. Idea come from this question.

\documentclass[letterpaper,12pt,addpoints]{exam}
%\usepackage[utf8]{inputenc} %don't need anymore
\usepackage[T1]{fontenc}
\usepackage[french]{babel}
\usepackage[top=1in, bottom=1in, left=0.75in, right=0.75in]{geometry}
\usepackage{amsmath,amssymb}
\newcommand{\university}{Gymnase de}
\newcommand{\faculty}{Cours de }
\newcommand{\class}{1C}
\newcommand{\examnum}{Test n}
\newcommand{\content}{Calcul }
\newcommand{\examdate}{Villeneuve sur France, 13 novembre 2023}
\newcommand{\timelimit}{45 minutes}

\pagestyle{headandfoot}
\firstpageheader{}{}{}
\firstpagefooter{}{Page \thepage\ of \numpages}{}
\runningheader{\class}{\examnum}{\examdate}
\runningheadrule
\runningfooter{}{Page \thepage\ of \numpages}{}

%%%%%%%%%%%%%%%%%%%%%%%%%%%
% define a new gradetable %
%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{ifthen}
\usepackage{array}

\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}

\newcounter{fqn}
\setcounter{fqn}{1}
\newcommand{\mygradetable}{%
{%
\renewcommand{\arraystretch}{1.5}
\begin{tabular}{|l*{\numquestions}{|C{0.72cm}}|C{2cm}|c|}
\hline Domanda: & \whiledo{ \not \( \thefqn > \numquestions\) }{%
        \ifthenelse{
        \not \( \thefqn > \numquestions \) }{%
            \thefqn &%
        }{}%
        \stepcounter{fqn}%
    }\setcounter{fqn}{1} Bonus Redaction&Total\\\hline
    Points: & \whiledo{ \not \( \thefqn > \numquestions \) }{%
        \ifthenelse{
        \not \( \thefqn > \numquestions \) }{%
            \pointsofquestion{\thefqn} &%
        }{}%
        \stepcounter{fqn}%
    }\setcounter{fqn}{1}&\numpoints \\\hline
    Punteggio: & \whiledo{ \not \( \thefqn > \numquestions \) }{%
        \ifthenelse{
        \not \( \thefqn > \numquestions \) }{%
             &%
        }{\setcounter{fqn}{1}}%
        \stepcounter{fqn}%
    }&\\\hline
\end{tabular}\par}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}

\title{\Large \textbf{\university\\ \faculty\\
        \bigskip
        \class -- \examnum \\ \content}}
\author{Enseignant: Ciao Ciao}
\date{\examdate}
\maketitle
\begin{flushleft}
    \makebox[12cm]{\textbf{Pr\'enom et nom}:\ \hrulefill}
\end{flushleft}
\noindent \rule{\textwidth}{1pt}
\begin{itemize}
\item \textbf{Durée:} 45 minutes\\
\item \textbf{Matériel autorisé:} Formulaire officiel non annot\'e  \\
\begin{center}
\textbf{Distribution des points}\\
\medskip
\gradetable[h][questions]

\mygradetable
\end{center}
\end{itemize}
\clearpage
\begin{questions}
    \question



    \clearpage
    \question
    The \textit{pmf} of the amount of memory \textit{X} (GB) in a purchased flash drive was given as
    \begin{center}
        \begin{tabular}{c|c|c|c|c|c} 
            $x$ & 1 & 2 & 4 & 8 & 16 \\
            \hline
            $p(x)$ & 0.05 & 0.10 & 0.35 & 0.40 & 0.10\\  
        \end{tabular}
    \end{center}
    Compute the following:
    \begin{parts}
        \part[2] Expected value $E(X)$
        \part[2] Variance $V(X)$ directly from the definition
        \part[2] The standard deviation $\sigma(X)$
        \part[2] $V(X)$ using the shortcut formula ($V(X)=E(X^2)-E^2(X)$)
    \end{parts}
    
    \clearpage
    \question Each of 12 refrigerators of a certain type has been returned to a distributor because of the presence of a high-pitched oscillating noise when the refrigerator is running. Suppose that 5 of these 12 have defective compressors and the other 7 have less serious problems. If they are examined in random order, let X = the number among the first 6 examined that have a defective compressor. Compute the following:
    \begin{parts}
        \part[3] $P(X=1)$
        \part[3] $P(X \geq 4)$
    \end{parts}
    
    \clearpage
    \question A reservation service employs five information operators who receive requests for information independently of one another, each according to a Poisson process with rate $\mu=2$ per minute.
    \begin{parts}
        \part[4] What is the probability that during a given 1-min period, the first operator receives no requests?
        \part[4] What is the probability that during a given 1-min period, exactly four of the five operators receive no requests?(\textit{Hint}: treat either as a binomial process of 5 trials with 4 successes or consider 5 combinations of Poisson processes, e.g. only 1st operation receives a request  or only 2nd operation receives a request and so on)
    \end{parts} 
\end{questions}

\clearpage
This page is intentionally left blank to accommodate work that wouldn't fit elsewhere and/or scratch work.
\end{document}

enter image description here

2
  • thanks a lot for your time and for your comprehensive answer! That looks great!
    – avati91
    Nov 15, 2023 at 22:01
  • @avati91 No problem.
    – Tom
    Nov 15, 2023 at 23:20
1

The first part of your question is easy: include

\hqword{Domanda:}
\hsword{Punteggio:}

in your preamble. There are a series of commands like this, of the form \ABCword, where:

  • A is nothing for \gradetable, or b for \bonusgradetable, or c for \combinedgradetable;
  • B is h for horizontal or v for vertical;
  • C is q for Question, or pg for Page, or p for Points, or s for Score, or t for Total.

Unfortunately the second bit, with an extra column, will require a lot more tinkering with the class internals.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .