\documentclass[11pt]{article}

\usepackage[utf8]{inputenc}
\usepackage[danish]{babel}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{tikz}
\usetikzlibrary{circuits.logic.US,circuits.logic.IEC}
\usepackage{graphicx}
\usepackage[a4paper, margin=4cm]{geometry}


\setlength{\parindent}{0em}
\setlength{\parskip}{1ex plus .1ex minus .1ex}

%%%%%%%%%%%%%% start of preample for LatexMCGenerator %%%%%%%%%%%%%%%%%
\usepackage[tightpage,pdftex,delayed]{preview}
\setlength{\PreviewBorder}{4pt}

\newcounter{Question}
\newcounter{Answer}[Question]

%% Question with single correct answer among several answer options
%% (implemented in Digital Eksamen as a "Basic Question"). The single
%% parameter is the points awarded for the question.
\newenvironment{Question}[1]
{\stepcounter{Question}
\medskip
\textbf{Question~\arabic{Question}}

\begin{preview}\hfill\fbox{#1 point}\par\bigskip}
{\bigskip
\end{preview}
}
%% Question where each answer option must be designated true or false
%% (implemented in Digital Eksamen as a two-column "Matrix
%% Question"). The first parameter is the points awarded for the
%% question, the second is a string giving the headers of the two
%% columns, separated by ';'.
\newenvironment{QuestionMultipleAnswers}[2]
{\stepcounter{Question}
\medskip
\textbf{Question~\arabic{Question}}

\begin{preview}\hfill\fbox{#1 point}\par\bigskip}
{\bigskip
\end{preview}
}
%% A correct answer option
\newenvironment{AnswerTrue}
{\stepcounter{Answer}
\makebox[2.5cm][l]{\underline{Answer~\arabic{Question}.\arabic{Answer}:}}
\begin{preview}}
{\bigskip
\end{preview}
}
%% A wrong answer option
\newenvironment{Answer}
{\stepcounter{Answer}
\makebox[2.5cm][l]{Answer~\arabic{Question}.\arabic{Answer}:}
\begin{preview}}
{\bigskip
\end{preview}
}
%%%%%%%%%%%%% end of preample for LatexMCGenerator %%%%%%%%%%%%%%%%%%%

\begin{document}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{Question}{10}
Let $\vec{f}(x,y,z) = (y^2z, y^3, xz)$, let
$V \subseteq \mathbb{R}^3$ be given by $-1 \le x \le 1$,
$-1 \le y \le 1$, $0 \le z \le 2$, and let $S = \partial V$ be the
boundary of $V$. What is the value of the following surface
integral?  [Hint: use the divergence theorem.]
$$ \iint_S \vec{f} \cdot \vec{n}\,\, dS$$
\end{Question}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{Answer}
$2\pi$
\end{Answer}

\begin{AnswerTrue}
8
\end{AnswerTrue}

\begin{Answer}
$\infty$
\end{Answer}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{Question}{5}
How many inversions are there in the list below?
\begin{center}
\includegraphics{exampleFigure.pdf}
\end{center}
\end{Question}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{Answer}
15
\end{Answer}

\begin{Answer}
17
\end{Answer}

\begin{AnswerTrue}
19
\end{AnswerTrue}

\begin{Answer}
21
\end{Answer}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{QuestionMultipleAnswers}{7}{Yes;No}
For which of the inputs below does the following circuit produce an
output of 1?
\begin{center}
\begin{tikzpicture}[circuit logic US]
\matrix[column sep=7mm]
{
\node (i0) {$x$}; & & \\
& \node [xor gate] (a1) {}; & \\
\node (i1) {$y$}; & & \node [and gate] (o) {};\\
& \node [or gate] (a2) {}; & \\
\node (i2) {$z$}; & & \\
};
\draw (i0.east) -- ++(right:3mm) |- (a1.input 1);
\draw (i1.east) -- ++(right:3mm) |- (a1.input 2);
\draw (i1.east) -- ++(right:3mm) |- (a2.input 1);
\draw (i2.east) -- ++(right:3mm) |- (a2.input 2);
\draw (a1.output) -- ++(right:4.3mm) |- (o.input 1);
\draw (a2.output) -- ++(right:3mm) |- (o.input 2);
\draw (o.output) -- ++(right:3mm);
\end{tikzpicture}
\end{center}
\end{QuestionMultipleAnswers}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{AnswerTrue}
$(x,y,z) = (1,0,1)$
\end{AnswerTrue}

\begin{Answer}
$(x,y,z) = (0,0,0)$
\end{Answer}

\begin{AnswerTrue}
$(x,y,z) = (0,1,0)$
\end{AnswerTrue}

\begin{Answer}
$(x,y,z) = (1,0,0)$
\end{Answer}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\end{document}
