# Make table, point total work for exam with optional questions

I am writing an exam with the exam class, and I am including a single question where the students are supposed to choose only half to answer. There are six total parts, and they answer three.

I automatically calculate the points for each question using

\qformat{Question \thequestion{} (\totalpoints{} \points ) \hfill}


I am displaying the points for each question, as well as the total for the exam, in a table. I can manually get the correct number of total points using \settabletotalpoints{100}

But can I get the specific question's total to show up in the table as only half? I could imagine a solution that simply excluded a given part or question from the total calculation. Is there a way to do that?

\documentclass[addpoints,10pt]{exam}
\begin{document}
\qformat{Question \thequestion{} (\totalpoints{} \points ) \hfill}
\settabletotalpoints{100}
\begin{questions}
\question
This is the question. Do only one of part A or B. Your choice. Don't do both.
\begin{parts}
\part[100]
This is part A.
\part[100]
This is part B.
\end{parts}
\end{questions}
\end{document}

• Welcome to TeX.SX! Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – user31729 Mar 9 '15 at 21:26
• Why not omit the point value of each part and just give the overall point value of the question? – erik Mar 9 '15 at 23:13

You can use \noaddpoints and \addpoints as in the following example:

\documentclass[addpoints,10pt]{exam}
\begin{document}
\qformat{Question \thequestion{} (\totalpoints{} \points ) \hfill}
%\settabletotalpoints{100}
\begin{questions}
\question
This is the question. Do only one of part A or B. Your choice. Don't do both.
\begin{parts}