Added a few quiz questions; Minor edits.
--- a/day1/session1.tex Sun Jan 10 18:29:20 2010 +0530
+++ b/day1/session1.tex Sun Jan 10 22:36:09 2010 +0530
@@ -180,6 +180,7 @@
\item \typ{pendulum.txt}
\item \typ{points.txt}
\item \typ{pos.txt}
+ \item \typ{holmes.txt}
\end{itemize}
\item Python scripts:
\begin{itemize}
@@ -189,6 +190,7 @@
\item Images
\begin{itemize}
\item \typ{lena.png}
+ \item \typ{smoothing.gif}
\end{itemize}
\end{enumerate}
\end{frame}
@@ -526,9 +528,18 @@
\begin{frame}[fragile]
\frametitle{\incqno }
+Draw (roughly) the plot obtained by the following:
+\begin{lstlisting}
+In []: x = linspace(0, 2*pi, 3)
+In []: plot(x, sin(x))
+\end{lstlisting}
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{\incqno }
Describe the plot produced by the following:
\begin{lstlisting}
-In []: x = linspace(0, 2*pi)
+In []: x = linspace(0, 2*pi, 50)
In []: plot(x, cos(x), 'go')
\end{lstlisting}
\end{frame}
@@ -551,3 +562,15 @@
What ipython magic command do you use to obtain the lines of code you have already typed in the interpreter? What command do you use to save them?
\end{frame}
+\begin{frame}
+\frametitle{\incqno }
+The following code snippet has an error/bug:
+\begin{lstlisting}
+In []: y = linspace(0, 2*pi, 50)
+In []: plot(y, sin(y))
+In []: clf()
+In []: plot(y, cos(y))
+In []: legend(['sin(y)', 'cos(y)'])
+\end{lstlisting}
+What is the error? How do you fix it?
+\end{frame}
--- a/day1/session2.tex Sun Jan 10 18:29:20 2010 +0530
+++ b/day1/session2.tex Sun Jan 10 22:36:09 2010 +0530
@@ -301,6 +301,8 @@
In []: for time in t:
....: tsq.append(time*time)
+ ....:
+ ....:
In []: plot(l, tsq)
Out[]: [<matplotlib.lines.Line2D object at 0xa5b05ac>]
@@ -512,6 +514,16 @@
\begin{frame}[fragile]
\frametitle{\incqno }
+What would be the result of the following code snippet:
+\begin{lstlisting}
+In []: x = linspace(0, 10, 50)
+In []: y = linspace(50, 100, 100)
+In []: plot(x, y)
+\end{lstlisting}
+\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]