\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 Quiz 6}
\medskip
\centerline{\Large\bf Date: Mar 6th, 2012}


\medskip
\hrule

\medskip

\begin{enumerate}
\item \textbf{[5 points]} 
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][0::2]}
\vspace{0.75in}
\item[(b)] \texttt{"a" in L[1][0]}
\vspace{0.75in}
\item[(c)] \texttt{L[:1] + L[1]}
\vspace{0.75in}
\item[(d)] \texttt{L[2::2]}
\vspace{0.75in}
\item[(e)] \texttt{L[2][2] in L[1]}
\vspace{0.75in}
\end{itemize}


\textbf{Turn over for Problem 2.}
\newpage

\item\textbf{[5 points]} 
Here is a partially completed function called \texttt{subsetOf} that takes two lists and
returns \texttt{True} if every element of the first list is also in the second list; otherwise the
function returns \texttt{False}.
For example, if the first list is \texttt{[3, 8.5, -22]}  and the second list is \texttt{["hello", -22, "hi", 8.5, "goblin", 3]}
then function would return \texttt{True}.
On the other hand, if the first list is \texttt{[3, 8.5, -22]} and the second list if \texttt{["hello", -22, "hi", "goblin", 3]}
then the function would return \texttt{False}.
There is one line missing in this function. Your task is to supply this line.

\begin{framed}
\begin{verbatim}
def subsetOf(L1, L2):
    for e in L1:
        # Fill in the statement below

        ______________________________________ :

            return False

    return True
\end{verbatim}
\end{framed}
\end{enumerate}
\hrule
\end{document}
