
diff -r f91a75802238 -r adb85e126341 day1/session4.tex
--- a/day1/session4.tex	Wed Jan 06 13:59:03 2010 +0530
+++ b/day1/session4.tex	Sun Jan 10 16:43:15 2010 +0530
@@ -607,3 +607,98 @@
 \end{frame}
 
 \end{document}
+
+%% Questions for Quiz %%
+%% ------------------ %%
+
+\begin{frame}[fragile]
+\frametitle{\incqno }
+\begin{lstlisting}
+In []: a = array([[1, 2],
+                  [3, 4]])
+In []: a[1,0] = 0
+\end{lstlisting}
+What is the resulting array?
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{\incqno }
+\begin{lstlisting}
+  In []: x = array(([1,2,3,4],
+                    [2,3,4,5]))
+  In []: x[-2][-3] = 4
+  In []: print x
+\end{lstlisting}
+What will be printed?
+\end{frame}
+
+%% \begin{frame}[fragile]
+%% \frametitle{\incqno }
+%% \begin{lstlisting}
+%%   In []: x = array([[1,2,3,4],
+%%                     [3,4,2,5]])
+%% \end{lstlisting}
+%% What is the \lstinline+shape+ of this array?
+%% \end{frame}
+
+\begin{frame}[fragile]
+\frametitle{\incqno }
+\begin{lstlisting}
+  In []: x = array([[1,2,3,4]])
+\end{lstlisting}
+How to \lstinline+x+ to \lstinline+array([[1,2,0,4]])+?
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{\incqno }
+\begin{lstlisting}
+  In []: x = array([[1,2,3,4],
+                    [3,4,2,5]])
+\end{lstlisting}
+How do you get the following slice of \lstinline+x+?
+\begin{lstlisting}
+array([[2,3],
+       [4,2]])
+\end{lstlisting}
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{\incqno }
+\begin{lstlisting}
+In []: a = array([[1, 2],
+                  [3, 4]])
+\end{lstlisting}
+How do you get the transpose of this array?
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{\incqno }
+\begin{lstlisting}
+In []: a = array([[1, 2],
+                  [3, 4]])
+In []: b = array([[1, 1],
+                  [2, 2]])
+In []: a*b
+\end{lstlisting}
+What does this produce?
+\end{frame}
+
+\begin{frame}
+\frametitle{\incqno }
+What command do you use to find the inverse of a matrix and its
+eigenvalues?
+\end{frame}
+
+%% \begin{frame}
+%% \frametitle{\incqno }
+%% The file \lstinline+datafile.txt+ contains 3 columns of data.  What
+%% command will you use to read the entire data file into an array?
+%% \end{frame}
+
+%% \begin{frame}
+%% \frametitle{\incqno }
+%% If the contents of the file \lstinline+datafile.txt+ is read into an
+%% $N\times3$ array called \lstinline+data+, how would you obtain the third
+%% column of this data?
+%% \end{frame}
+




