\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 8 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
Suppose that the list \texttt{L} equals
\texttt{["estimate the parameters", [1, 2, 3], "randomized algorithms", [0, 1, 2, 3, 4, 5]]}.
Evaluate the following expressions.

\begin{itemize}
\item[(a)] \texttt{L[1::3]}

\vspace{0.6in}

\item[(b)] \texttt{L[2].split("o")}

\vspace{0.6in}

\item[(c)] \texttt{L[::-1][0][1::2]}

\vspace{0.6in}

\item[(d)] \texttt{(L[::-1][len(L)-1]).split("e")}

\vspace{0.6in}

\item[(e)] \texttt{list(range(1,25,7))}

\vspace{0.6in}

\item[(f)] \texttt{list(range(1, 25, 3))[3::2]}

\vspace{0.6in}

\item[(g)] \texttt{(L[0].split())[1].upper()}

\vspace{0.6in}

\item[(h)] \texttt{(list(range(10))*3)[2::2].count(8)}

\vspace{0.6in}

\item[(i)] \texttt{(L[0]+" " + L[2]).split()}

\vspace{0.5in}

\item[(j)] \texttt{"*".join(((L[0]+" " + L[2]).split())[::2])}
\end{itemize}
\end{document}
