\documentclass{article}

\usepackage{amsmath}
\usepackage{listings}
\usepackage{framed}
\usepackage{amssymb}
\usepackage{graphicx}

\addtolength{\textwidth}{1in}
\addtolength{\evensidemargin}{-0.5in}
\addtolength{\oddsidemargin}{-0.5in}
\addtolength{\textheight}{1in}
\addtolength{\topmargin}{-0.5in}

\begin{document}

\noindent
\centerline{\Large\bf 22C:16 Practice for Quiz 7}
\medskip

\medskip
\hrule

\begin{enumerate}
\item 
What does each of the following expression evaluate to?
\begin{itemize}
\item[(a)] \texttt{map(sum, [[1,2,3], [2,3,4], [3,4,5]])}
\vspace{0.75in}
\item[(b)] \texttt{map(sum, map(range, range(1,10,3)))}
\vspace{0.75in}
\item[(c)] \texttt{map(len, "hello???     how are you?".split())}
\vspace{0.75in}
\item[(d)] \texttt{filter(math.ceil, [0.09, -0.09, 1.78, 100.9, -0.1])}
\vspace{0.75in}
\item[(e)] \texttt{map(range, (map(len, ["hello", "how", "are", "you"])))}
\vspace{0.75in}
\end{itemize}

\item
What does each of the following expression evaluate to?
Suppose that \texttt{L} is the list \texttt{["These", "are", "a", "few", "words", "that", "we", "will", "use"]}.
\begin{itemize}
\item[(a)] \texttt{L[1:4:2]}
\vspace{0.75in}
\item[(b)] \texttt{L[::3]}
\vspace{0.75in}
\item[(c)] \texttt{L[4:5][0][2]}
\vspace{0.75in}
\item[(d)] \texttt{L[5][1:]}
\vspace{0.75in}
\item[(e)] \texttt{L[0:2] + L[4:6]}
\vspace{0.75in}
\end{itemize}
\end{enumerate}

\medskip

\hrule
\end{document}
