day1/day1quiz1.tex
changeset 371 9956a5bcd0f5
parent 354 5dc6c3673f9d
child 372 5f02dfb93df1
equal deleted inserted replaced
366:ec4cb3ba7f09 371:9956a5bcd0f5
    56     \item University/College/Company:
    56     \item University/College/Company:
    57     \item Student/Teacher/Professional:
    57     \item Student/Teacher/Professional:
    58   \end{itemize}
    58   \end{itemize}
    59 \end{frame}
    59 \end{frame}
    60 
    60 
    61 \begin{frame}[fragile]
       
    62 \frametitle{\incqno }
       
    63 Draw (roughly) the plot obtained by the following:
       
    64 \begin{lstlisting}
       
    65 In []: x = linspace(0, 2*pi, 3)
       
    66 In []: plot(x, sin(x))
       
    67 \end{lstlisting}
       
    68 \end{frame}
       
    69 
       
    70 %% \begin{frame}[fragile]
    61 %% \begin{frame}[fragile]
    71 %% \frametitle{\incqno }
    62 %% \frametitle{\incqno }
    72 %% Describe the plot produced by the following:
    63 %% Draw (roughly) the plot obtained by the following:
    73 %% \begin{lstlisting}
    64 %% \begin{lstlisting}
    74 %% In []: x = linspace(0, 2*pi, 50)
    65 %% In []: x = linspace(0, 2*pi, 3)
    75 %% In []: plot(x, cos(x), 'go')
    66 %% In []: plot(x, sin(x))
    76 %% \end{lstlisting}
    67 %% \end{lstlisting}
    77 %% \end{frame}
    68 %% \end{frame}
       
    69 
       
    70 \begin{frame}[fragile]
       
    71 \frametitle{\incqno }
       
    72 Describe the plot produced by the following:
       
    73 \begin{lstlisting}
       
    74 In []: x = linspace(0, 2*pi, 50)
       
    75 In []: plot(x, cos(x), 'go')
       
    76 \end{lstlisting}
       
    77 \end{frame}
    78 
    78 
    79 \begin{frame}
    79 \begin{frame}
    80 \frametitle{\incqno }
    80 \frametitle{\incqno }
    81 How will you plot the previous graph with line width set to 3?  How will
    81 How will you plot the previous graph with line width set to 3?  How will
    82 you set the $x$ and $y$ labels of the plot?
    82 you set the $x$ and $y$ labels of the plot?
   132 \begin{frame}
   132 \begin{frame}
   133 \frametitle{\incqno }
   133 \frametitle{\incqno }
   134 Write the code to read a file \texttt{data.txt} and print each line of it?
   134 Write the code to read a file \texttt{data.txt} and print each line of it?
   135 \end{frame}
   135 \end{frame}
   136 
   136 
   137 \begin{frame}[fragile]
   137 %% \begin{frame}[fragile]
   138 \frametitle{\incqno }
   138 %% \frametitle{\incqno }
   139 What would be the result of the following code snippet:
   139 %% What would be the result of the following code snippet:
   140 \begin{lstlisting}
   140 %% \begin{lstlisting}
   141 In []: x = linspace(0, 10, 50)
   141 %% In []: x = linspace(0, 10, 50)
   142 In []: y = linspace(50, 100, 100)
   142 %% In []: y = linspace(50, 100, 100)
   143 In []: plot(x, y)
   143 %% In []: plot(x, y)
   144 \end{lstlisting}
   144 %% \end{lstlisting}
   145 \end{frame}
   145 %% \end{frame}
   146 
   146 
   147 \begin{frame}[fragile]
   147 \begin{frame}[fragile]
   148 \frametitle{\incqno }
   148 \frametitle{\incqno }
   149 The following code snippet has an error/bug:
   149 The following code snippet has an error/bug:
   150 \begin{lstlisting}
   150 \begin{lstlisting}
   209 
   209 
   210 \begin{frame}[fragile]
   210 \begin{frame}[fragile]
   211 \frametitle{\incqno }
   211 \frametitle{\incqno }
   212 \begin{lstlisting}
   212 \begin{lstlisting}
   213 In []: marks = [10, 20, 30, 50, 55, 
   213 In []: marks = [10, 20, 30, 50, 55, 
   214                75, 83] 
   214                 75, 83] 
   215 \end{lstlisting}
   215 \end{lstlisting}
   216 How will you convert the list \texttt{marks} to an \alert{array}?
   216 How will you convert the list \texttt{marks} to an \alert{array}?
   217 \end{frame}
   217 \end{frame}
   218 
   218 
   219 \end{document}
   219 \end{document}