\documentclass[11pt]{article}
\usepackage[margin=1in]{geometry}
\usepackage{amsmath}
\setlength{\parindent}{0pt}
\setlength{\parskip}{4pt}


\usepackage[usenames,dvipsnames]{color}
\usepackage{listings}
\lstset{
    language=python,
    basicstyle=\tt\small,
    commentstyle=\color{Green},
    keywordstyle=\color{blue},
    stringstyle=\color{Orange},
    keepspaces=true,
    showstringspaces=false,
    emphstyle=\color{Maroon},
    emph={__name__}
}

\begin{document}

\large
CS 228, HW \#1 \hfill Due: 1/31/2014

\textbf{Name:} your name here

\textbf{e-ID:} your e-ID here

\textbf{Acknowledgement statement:}


\hrule
\normalsize

\bigskip
Unless otherwise specified, the exercises listed below are from the
textbook \emph{Discrete Mathematics and Its Applications, 7th Ed.}, by
Kenneth H.~Rosen. \textbf{Please show all of your work and explain
  your reasoning; don't just give the final answer.} Submit your
\texttt{hw1.tex} and \texttt{hw1.pdf} files via Canvas before 1:00 PM
on the due date. As a reminder, late work will NOT be accepted.

\section*{Section 4.2 (page 255)}

\subsection*{Exercise 2}
\textit{Implement Algorithm 1 from page 249 in Python. Then write
  statements that call your function to print the answers for question
  2. Your Python function should return a list where element 0
  represents $a_{k-1}$, element 1 represents $a_{k-2}$ etc. }


\begin{lstlisting}
# paste your python code here
\end{lstlisting}

\subsection*{Exercise 8}
\subsection*{Exercise 20}

\section*{Section 4.3 (page 272)}

\subsection*{Exercise 4, a--c}

\subsection*{Exercise 16, a--d}

\subsection*{Exercise 24, a--f}

\subsection*{Exercise 26, a--f}

\subsection*{Exercise 32}
\textit{Implement the Euclidean algorithm (as described on page 269) in Python. Then write statements that call your function to print the answers for parts a--f.}

\begin{lstlisting}
# paste your python code here
\end{lstlisting}

\subsection*{Exercise 34}
\textit{Modify your function from Exercise 32 to count the number of divisions, and print the count before returning. Use this code to answer to Exercise 34.}

\begin{lstlisting}
# paste your python code here
\end{lstlisting}


\end{document}
