\documentclass[noanswers,addpoints,12pt]{exam}
\usepackage[utf8]{inputenc}

\usepackage{booktabs}
\usepackage{subcaption}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{hyperref}

\usepackage{datetime}

\usepackage{enumerate}
\usepackage{enumitem}

\usepackage{xltxtra}
\usepackage{listings}

\usepackage{graphicx}
\usepackage{makecell}
\usepackage{multicol}
\usepackage{multirow}

\usepackage{tabularx}
\usepackage{textcomp}
\usepackage{tikz}
\usetikzlibrary{arrows,automata,decorations.pathmorphing,backgrounds,positioning,fit}

\usepackage{fontspec}
\setmainfont{Gentium Book Basic}
\setmonofont{Comic Code}[
  Scale          = 0.85,
]

\lstset{
  basicstyle=\ttfamily,
  language=java
}

\DeclareMathOperator{\limplies}{\Rightarrow}
\DeclareMathOperator{\lbiconditional}{\Leftrightarrow}
\DeclareMathOperator{\liff}{\iff}
\DeclareMathOperator{\lxor}{\oplus}
\DeclareMathOperator{\qeq}{\overset{?}{=}}
\DeclareMathOperator{\modulus}{\mathbf{mod}}
\DeclareMathOperator{\even}{even}
\DeclareMathOperator{\odd}{odd}
\DeclareMathOperator{\ddiv}{|}
\DeclareMathOperator{\ndiv}{\not|}
\DeclareMathOperator{\contra}{\Rightarrow\mskip-\thinmuskip\Leftarrow}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\Z}{\mathbb{Z}}
\renewcommand{\P}[1]{\mathbb{P}(#1)}
\newcommand{\mathcheckmark}{\text{ \ding{51}}}

\DeclareMathOperator{\vowel}{vowel}
\DeclareMathOperator{\consonant}{consonant}
\DeclareMathOperator{\isprime}{prime}
\DeclareMathOperator{\equals}{equals}
\DeclareMathOperator{\divides}{divides}

\newcommand\examNumber{hMathPractice}
\newcommand\semester{Fall 2023}
\newcommand\className{Computer Science III}
\newcommand\classNumber{CIS~205}
\newcommand\classFullName{\classNumber~\className}
\renewcommand{\dateseparator}{-}
\yyyymmdddate

% /classname
\pagestyle{headandfoot}
\firstpageheader{~\\\classFullName}{\examNumber\\~}{~\\\semester}

\begin{document}
\pointsinrightmargin

Notes on turning in homework:
\begin{itemize}
\item You will turn in an \emph{electronic copy} through
  \textbf{Brightspace}.
\item Answer on a \emph{separate} sheet of paper (if hand-writing the
  answers) or in a \emph{separate} document (if typing the
  answers). Homework assignments do not have any room for answers in
  their layout.
\item Your answers should be \emph{self-documenting}, letting you
  \emph{study} them without needing the assignment in hand. When
  answering a question: begin by copying the number and the question
  before writing your answer.
\end{itemize}

\begin{questions}
  \begin{multicols}{2}

\question{} Multiply out the following polynomials:
  \begin{parts}
  \part{} $(n + 2)^2$
  \part{} $(3x +1)^2$
  \part{} $(a + b)(a - b)$
  \part{} $(y + z)^3$
  \end{parts}
\question{} Factor the following polynomials:
  \begin{parts}
  \part{} $8x^3 + 12x^2 + 6x + 1$
  \part{} $d^2 - 9$
  \part{} $n^3 - n$
  \end{parts}
  \end{multicols}

\question{} Given each of the following \emph{recursive} function definitions,
  what are the values for $n$ between 1 and 7 (seven answers for each
  part)?
  \begin{parts}
  \part{} $H(n) = n \times H(n-1)$; $H(1) = 1$
  \part{} $Q(n) = 2 \times Q(n-1)$; $Q(1) = 2$
  \part{} $T(n) = T(n - 1) + T(n - 2) + T(n - 3)$; $T(1) = 1$, $T(2) =
    2$, $T(3) = 3$
  \end{parts}

\question{} Consider driving from Potsdam to Syracuse, a road distance
  of 144 \emph{miles}. If you travel in 2 \emph{hours}, 32 \emph{minutes}.
  \begin{parts}
  \part{} What \emph{unit} would you use to express your traveling \emph{speed}?
  \part{} What is the actual \emph{speed} in the given example?
    Do not forget the units.
  \end{parts}

\question{} Consider an old, large wine barrel that is marked as
  holding 12 \emph{hogsheads} of liquid. If, after opening the spigot
  on the \emph{full} barrel, it takes 1 \emph{minute} to empty.
  \begin{parts}
  \part{} What \emph{unit} would you use to express the rate of flow?
  \part{} What is the actual rate of flow in the example?
  \end{parts}

\question{} Consider transferring a 1 \emph{megabyte} file across a
  network in 6 \emph{seconds}. \\
  \textbf{bandwidth} ::= speed of \emph{data} across a network.
  \begin{parts}
  \part{} What \emph{unit} would you use to express \emph{bandwidth}?
  \part{} What is the network \emph{bandwidth} in the given example?
  \end{parts}
\end{questions}

\noindent
\textbf{Submit} your answers electronically, in a commonly readable
format
(\emph{e.g.} \lstinline{.pdf}, \lstinline{.txt}, \lstinline{.docx}),
through BrightSpace. If you photograph hand-written answers please
make sure there is enough contrast that I can read them and
\emph{please} put all the pages in a single file (Adobe Scan is
available on Android and iOS).
\end{document}

%%% Local Variables:
%%% mode: latex
%%% TeX-master: t
%%% End:
