diff options
author | Puneeth Chaganti | 2010-01-10 22:36:09 +0530 |
---|---|---|
committer | Puneeth Chaganti | 2010-01-10 22:36:09 +0530 |
commit | bef0b007b0c8ea9016c0f990d396c7827d2968af (patch) | |
tree | ce1eecdec403a0660e666752d9f27891eb8b10b2 | |
parent | c582c677e54a19f06af15ddfe4785615718595c5 (diff) | |
download | workshops-more-scipy-bef0b007b0c8ea9016c0f990d396c7827d2968af.tar.gz workshops-more-scipy-bef0b007b0c8ea9016c0f990d396c7827d2968af.tar.bz2 workshops-more-scipy-bef0b007b0c8ea9016c0f990d396c7827d2968af.zip |
Added a few quiz questions; Minor edits.
-rw-r--r-- | day1/session1.tex | 25 | ||||
-rw-r--r-- | day1/session2.tex | 12 |
2 files changed, 36 insertions, 1 deletions
diff --git a/day1/session1.tex b/day1/session1.tex index 92b577f..9805f2e 100644 --- a/day1/session1.tex +++ b/day1/session1.tex @@ -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 @@ Save commands of review problem into file \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 @@ is in the rectangle $(0, -1.5)$ (left bottom coordinate) and $(2\pi, 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} diff --git a/day1/session2.tex b/day1/session2.tex index a845d98..ed30335 100644 --- a/day1/session2.tex +++ b/day1/session2.tex @@ -301,6 +301,8 @@ In []: tsq = [] In []: for time in t: ....: tsq.append(time*time) + ....: + ....: In []: plot(l, tsq) Out[]: [<matplotlib.lines.Line2D object at 0xa5b05ac>] @@ -512,6 +514,16 @@ Write the code to read a file \texttt{data.txt} and print each line of it? \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] |