\documentclass[noanswers,addpoints,10pt]{exam}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage[most]{tcolorbox}
\usepackage{datetime}
\usepackage{enumerate}
\usepackage{enumitem}
\usepackage{xltxtra}
\usepackage{listings}

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

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

% compact itemized and then enumerated
\setlist{leftmargin=*,
  noitemsep,
  topsep=5pt,
  parsep=0pt,
  partopsep=0pt,
}

\setlist[enumerate]{leftmargin=*,
  itemsep=2pt,
  topsep=0pt,
  parsep=0pt,
  partopsep=0pt,
}


\usepackage{fontspec}
\setmainfont{Gentium Basic}
\setmonofont{Comic Code}[
  Scale          = 0.80,
  UprightFont    = *-Regular,
  ItalicFont     = *-Italic,
  BoldFont       = *-Bold,
  BoldItalicFont = *-Bold Italic
]

\lstset{
  basicstyle=\ttfamily,
}

\DeclareMathOperator{\limplies}{\Rightarrow}
\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)}

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

% classname
\newcommand\examNumber{gPogil-Sums}
\newcommand\semester{Spring 2023}
\newcommand\className{Foundations of Computer Science}
\newcommand\classNumber{CIS~300}
\newcommand\classFullName{\classNumber~\className}
\renewcommand{\dateseparator}{-}
\yyyymmdddate

% /classname

\pagestyle{headandfoot}
\firstpageheader{\classFullName\\\semester}{\examNumber\\~}{\today\\~}
\runningheader{\examNumber}{}{\today}


\title{\examNumber}


\newenvironment{showExample}[1]{
  \begingroup
  \renewcommand{\solutiontitle}{\noindent\textbf{Example:}\enspace}
  \printanswers
  \begin{solution}[#1]
  }{
  \end{solution}
  \endgroup
}

\begin{document}

\section*{Introduction}
This assignment is your first group project
for \lstinline{Foundations}. It is designed to teach you how group
work is to be done in this class. The method for the group work may
seem either silly or overly scripted. It is actually drawn from
research on brain function and learning theory. I ask that you do your
best to follow the plan but feel free to let me know if, for some
reason, this method interferes with \emph{your} learning style.

[Based in part on documents found on cspogil.org.]

\section*{Note}
\begin{itemize}
\item By \textbf{design}, this assignment includes questions about
  topics that you have not yet seen in lecture. This encourages
  \emph{creative} exploration and \emph{constructing} your own mental
  models.
\item Your group is expected to work together on \emph{each} question:
  the goal is \textbf{not} to fill in the ``right'' answers as quickly
  as possible but rather to take the time to read, think, and discuss
  the material \textbf{together}.
\item Constructing your own model is \textbf{short-circuited} by
  reading or parroting another thinker's answer. This means you
  should, as much as possible, use \emph{recall} of class material,
  looking up definitions in \emph{notes} or the \emph{textbook} when
  necessary, and \emph{avoid} just typing the question into a search
  engine on the Web. If you want more information, feel free to search
  \textbf{after} the group work is finished.
\item Each student in the group has more or less experience with the
  topics in the assignment. If you have greater familiarity
  with the topics, \emph{please} hold back a little bit so others can
  engage with building their own knowledge. You, too, must engage
  because there is always more to learn.
\end{itemize}

\section*{Assignment Goals}
After completing this group assignment, each student is expected to be
able to
\noindent
Learning Outcomes
  \begin{itemize}
  \item Name the members of your group.
  \item Describe the \emph{four} roles in the POGIL method.
  \item Read superscript notation for subsets of the integers.
  \item Recognize simple $\sum$ notation.
\end{itemize}

\section*{Procedure}

\textbf{Get out paper.} The group will turn in \emph{one}
document. Place the names of all present group members atop the
page. This page will also be used by the speaker when answering
questions at the end of the class.

\noindent
\textbf{Copy each question before the answer.} This makes the answer
sheet a worthwhile study guide w/o the worksheet. The answers written
down should be \emph{discussed} by the group and represent the
\emph{consensus} of the group. Sometimes a \emph{picture}, a
\emph{graph}, or something similar is the most appropriate way to
answer a question.

\noindent
\textbf{Assign Roles.} Students should take roles they
have not held recently (or, perhaps, ever):

\begin{description}
\item[Manager] Move discussion forward.
\item[Reflector] Monitor that everyone gets heard and is caught
  up. (This is a \textbf{group} obligation, really.)
\item[Speaker] Asks the facilitator questions and communicates what the team has done.
\item[Recorder] Writes the report.
\end{description}

\noindent
\textbf{Answer these questions.}

\begin{questions}
\question{} \emph{Introduce} yourself to your fellow group members,
  including completions to the following prompts. These are designed
  to help each of you be more comfortable with being \textbf{wrong} in
  front of one another. \textbf{Mistakes} are a major part of
  learning.
  \begin{parts}
  \part{} The \emph{longest} computer program I have ever written was
    \ldots{}.
  \part{} The most \emph{challenging} computer bug I have ever had to
    solve was \ldots{}.
  \end{parts}

\question{} Read the \emph{Four Roles} cards (pass them around).
  \begin{parts}
  \part{} \emph{List} the names of the four roles we will use in our group
    work this semester.
  \part{} \emph{Assign} each of the roles to a member of your
    group. If there are only three members, combine \textbf{Reflector}
    and \textbf{Speaker}; if there are more members than roles, there
    is always next week.
  \part{} Each team member should read their role description. Then,
    without copying the card, \textbf{write} a short paragraph
    summarizing, in their own words, how their role fits into the
    \emph{group} answering the questions.

    When the descriptions are done, the group comes back together and
    each person shares their summary with the group.
  \end{parts}

\question{} What is an \emph{integer}? Give an example of a
  \emph{number} that \textbf{is} an integer. Give an example of a
  number that \textbf{is not} an integer.

  \uplevel{The symbol $\Z$ stands for the set of \textbf{all}
    integers, $\{\dots -3, -2, -1, 0, 1, 2, 3, \dots\}$. $\Z^{>0}$ is
    limited to the set of \emph{positive} integers and $\Z^{\le -250}$
    would be all integers less than or equal to $-250$}

\question{} List the five lowest value elements in $\Z^{>0}$.

\question{} List the five lowest value elements in $\Z^{\ge
    0}$. What's the difference with the previous answer?

\question{} Write out the \emph{sum} of the first (lowest) five
  elements in $\Z^{>0}$. That is, list the elements with $+$ signs
  between them. Calculate the sum.

\question{} Write out the \emph{sum} of the \textbf{squares} of the
  first (lowest) five elements in $\Z^{>0}$. That is, list the
  elements, with the superscript 2, with $+$ signs between
  them. Calculate the sum.

\question{} Write out the \emph{sum} of the integers in the set $\{5,
  6, 7, 8, 9, 10, 11, 12, 13, 14, 15\}$. That is, list the elements
  with plus signs. Then calculate the sum. What makes this question
  more tedious than the previous ones?

  \uplevel{The $\sum$ symbol, read as ``sum'' or ``Sigma'' (the Greek
    letter), is used by mathematicians to represent a sum across some
    set of values. Thus the sum of all integers from 5 to 15,
    inclusive, would be written $\sum\limits_{i=5}^{15} i$.

    Notice that the variable $i$ takes on \emph{each} of the values
    from the \textbf{start}, shown below the sum, to the \textbf{end},
    shown atop the sum. After the $\sum$ is the formula to sum.
  }

\question{} Rewrite the \emph{sum} of the first (lowest) five
  elements in $\Z^{>0}$ with the $\sum$ notation.

\question{} Write the \emph{sum} of the first hundred
  elements in $\Z^{>0}$ with the $\sum$ notation. (Aren't you glad
  this comes with the new notation?)

\question{} Rewrite the \emph{sum} of the first five \textbf{squares}
  of elements in $\Z^{>0}$ with the $\sum$ notation.

\question{} Consider $s = \sum\limits_{i=1}^{n} i$. \emph{What} is the lowest
  value of $n$ for which $s \ge 40$? Explain how you approached the
  problem.

\question{} \emph{Write} a Java \lstinline{for} loop with the loop-control
  variable \lstinline{j} that sums the first twelve \emph{positive}
  integers into a variable named \lstinline{sum}.

\question{} \emph{Write} the same sum as the previous question using the
  $\sum$ notation.

\question{} Looking at the answers to the previous two questions, how
  are the two notations, Java and $\sum$, the same? How are they
  different? \emph{Explain} what you need to be careful about when
  translating between the two notations.

\question{} Using what you know about Java \lstinline{for} loops, what
  would you expect the sum $\sum\limits_{i=5}^{6} i$ to be? What about
  $\sum\limits_{i=6}^{6} i$? What about $\sum\limits_{i=7}^{6} i$?
  Explain each of your answers.
\end{questions}
\end{document}

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