\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 2}
\medskip
\centerline{\Large\bf Date: Jan 31st, 2012}


\medskip
\hrule

\medskip

\begin{enumerate}
\item Write down the output produced by the following program:
\begin{framed}
\begin{verbatim}
n = 10
while n < 13:
    if n%3 == 0:
        print "Line 1"
    else:
        print "Line 2"
    n = n + 1
\end{verbatim}
\end{framed}

\vspace{1.5in}


\item Write down the output produced by the following program:
\begin{framed}
\begin{verbatim}
n = 10
m = 15
while m >= n:
    if (m + n) % 5 == 0:
        print "Line 1", n, m
        m = m - 1
    else:
        print "Line 2", n, m
        n = n + 1
        m = m - 1 
\end{verbatim}
\end{framed}
\vspace{1.5in}
\end{enumerate}
\end{document}
