day1/day1quiz1.tex
changeset 372 5f02dfb93df1
parent 371 9956a5bcd0f5
child 373 f04eca8b2f3d
equal deleted inserted replaced
371:9956a5bcd0f5 372:5f02dfb93df1
    92 \begin{frame}
    92 \begin{frame}
    93 \frametitle{\incqno }
    93 \frametitle{\incqno }
    94 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?
    94 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?
    95 \end{frame}
    95 \end{frame}
    96 
    96 
    97 \begin{frame}[fragile]
    97 %% \begin{frame}[fragile]
    98 \frametitle{\incqno }
    98 %% \frametitle{\incqno }
    99 The following code snippet has an error/bug:
    99 %% The following code snippet has an error/bug:
   100 \begin{lstlisting}
   100 %% \begin{lstlisting}
   101 In []: y = linspace(0, 2*pi, 50)
   101 %% In []: y = linspace(0, 2*pi, 50)
   102 In []: plot(y, sin(y))
   102 %% In []: plot(y, sin(y))
   103 In []: clf()
   103 %% In []: clf()
   104 In []: plot(y, cos(y))
   104 %% In []: plot(y, cos(y))
   105 In []: legend(['sin(y)', 'cos(y)']) 
   105 %% In []: legend(['sin(y)', 'cos(y)']) 
   106 \end{lstlisting}
   106 %% \end{lstlisting}
   107 What is the error? How do you fix it?  
   107 %% What is the error? How do you fix it?  
   108 \end{frame}
   108 %% \end{frame}
   109 
   109 
   110 \begin{frame}[fragile]
   110 \begin{frame}[fragile]
   111 \frametitle{\incqno }
   111 \frametitle{\incqno }
   112   \begin{lstlisting}
   112   \begin{lstlisting}
   113   In []: a = [1, 2, 5, 9]
   113   In []: a = [1, 2, 5, 9]