\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 CS:1210 (22C:16) Quiz 3 Version (c)}

\medskip

\medskip
\hrule

\medskip
\noindent
You have 15 minutes to complete this quiz.
Please put away your books, notes, and all electronic devices

\noindent
\begin{enumerate}
\item Write down the output of this program.
\begin{center}
\begin{framed}
\begin{verbatim}
n = 10
m = 12
while (m >= n) or True:
    if ((m + n) % 2 == 0) or ((m + n) % 3 == 0):
        print("Line 1", n, m)
        m = m - 1
    else:
        print("Line 2", n, m)
        n = n + 1
        m = m - 1
    
    if abs(m-n) > 6:
        break
\end{verbatim}
\end{framed}
\end{center}

\newpage

\item Write down the output of this program.
\begin{center}
\begin{framed}
\begin{verbatim}
answer = ""
n = 28
if (n % 5) < 3:
    while n > 0:
        answer = answer + str(n) + " " 
        n = n - 10
else:
    if (n < 100):
        while n > 0:
            answer = answer + str(n) + " " 
            n = n - 5
            if n < 6:
                break

print(answer)  
\end{verbatim}
\end{framed}
\end{center}
\end{enumerate}
\vspace{2in}
\medskip
\hrule
\end{document}
