day1/session2.tex
changeset 343 adb85e126341
parent 339 8ac5fe07810f
child 352 b44d7bcc6609
--- a/day1/session2.tex	Wed Jan 06 13:59:03 2010 +0530
+++ b/day1/session2.tex	Sun Jan 10 16:43:15 2010 +0530
@@ -479,3 +479,47 @@
 \end{frame}
 
 \end{document}
+
+%% Questions for Quiz %%
+%% ------------------ %%
+
+\begin{frame}[fragile]
+\frametitle{\incqno }
+  \begin{lstlisting}
+  In []: a = [1, 2, 5, 9]
+  In []: a[0:-1]
+  \end{lstlisting}
+  What is the output?
+\end{frame}
+
+\begin{frame}
+\frametitle{\incqno }
+  How do you combine two lists \emph{a} and \emph{b} to produce one list?
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{\incqno }
+  \begin{lstlisting}
+  In []: a = [1, 2, 5, 9]
+  \end{lstlisting}
+  How do you add the value 10 to the end of this list?
+\end{frame}
+
+\begin{frame}
+\frametitle{\incqno }
+Write the code to read a file \texttt{data.txt} and print each line of it?
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{\incqno }
+The following code snippet has an error/bug:
+\begin{lstlisting}
+In []: l = [0.1, 0.2, 0.3, 0.4]
+In []: t = [0.69, 0.90, 1.19, 1.30]
+In []: tsq = []
+In []: for time in t:
+ ....:     tsq.append(time*time)
+ ....:     plot(l, tsq)
+\end{lstlisting}
+What is the error? How do you fix it?
+\end{frame}