author | Santosh G. Vattam <vattam.santosh@gmail.com> |
Wed, 06 Jan 2010 13:59:03 +0530 | |
changeset 342 | f91a75802238 |
parent 334 | 2214b5dba4d4 |
child 343 | adb85e126341 |
permissions | -rw-r--r-- |
261
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
1 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
306
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
2 |
% Quiz slides day 1 quiz 1 |
261
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
3 |
% |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
4 |
% Author: FOSSEE <info at fossee dot in> |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
5 |
% Copyright (c) 2005-2009, FOSSEE Team |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
6 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
7 |
|
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
8 |
|
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
9 |
\documentclass[14pt,compress]{beamer} |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
10 |
|
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
11 |
\mode<presentation> |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
12 |
{ |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
13 |
\useoutertheme{split} |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
14 |
\setbeamercovered{transparent} |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
15 |
} |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
16 |
|
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
17 |
\definecolor{darkgreen}{rgb}{0,0.5,0} |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
18 |
|
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
19 |
\usepackage{listings} |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
20 |
\lstset{language=Python, |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
21 |
basicstyle=\ttfamily\bfseries, |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
22 |
commentstyle=\color{red}\itshape, |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
23 |
stringstyle=\color{darkgreen}, |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
24 |
showstringspaces=false, |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
25 |
keywordstyle=\color{blue}\bfseries} |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
26 |
|
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
27 |
\newcommand{\kwrd}[1]{ \texttt{\textbf{\color{blue}{#1}}} } |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
28 |
|
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
29 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
30 |
% Macros |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
31 |
|
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
32 |
\newcounter{qno} |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
33 |
\setcounter{qno}{0} |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
34 |
\newcommand{\incqno}{\addtocounter{qno}{1}{Question \theqno}} |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
35 |
|
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
36 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
37 |
% Title page |
306
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
38 |
\title[Basic Python]{Python for science and engineering: Day 1, Quiz 1} |
261
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
39 |
|
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
40 |
\author[FOSSEE Team] {FOSSEE} |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
41 |
|
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
42 |
\institute[IIT Bombay] {Department of Aerospace Engineering\\IIT Bombay} |
306
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
43 |
\date[] {\today \\Day 1, Quiz 1} |
261
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
44 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
45 |
|
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
46 |
|
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
47 |
\begin{document} |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
48 |
|
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
49 |
\begin{frame} |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
50 |
\titlepage |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
51 |
\end{frame} |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
52 |
|
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
53 |
\begin{frame} |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
54 |
\frametitle{Write your details...} |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
55 |
On the top right hand corner please write down the following: |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
56 |
\begin{itemize} |
306
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
57 |
\item Name: |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
58 |
\item University/College/Company: |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
59 |
\item Student/Teacher/Professional: |
261
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
60 |
\end{itemize} |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
61 |
\end{frame} |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
62 |
|
306
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
63 |
\begin{frame}[fragile] |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
64 |
\frametitle{\incqno } |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
65 |
Describe the plot produced by the following: |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
66 |
|
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
67 |
\begin{lstlisting} |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
68 |
In []: x = linspace(0, 2*pi) |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
69 |
In []: plot(x, cos(x), 'go') |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
70 |
\end{lstlisting} |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
71 |
\end{frame} |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
72 |
|
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
73 |
\begin{frame} |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
74 |
\frametitle{\incqno } |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
75 |
How will you plot the previous graph with line width set to 3? How will |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
76 |
you set the $x$ and $y$ labels of the plot? |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
77 |
\end{frame} |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
78 |
|
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
79 |
\begin{frame} |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
80 |
\frametitle{\incqno } |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
81 |
How will you set the x and y axis limits so that the region of interest |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
82 |
is in the rectangle $(0, -1.5)$ (left bottom coordinate) and $(2\pi, |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
83 |
1.5)$ (right top coordinate)? |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
84 |
\end{frame} |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
85 |
|
261
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
86 |
\begin{frame} |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
87 |
\frametitle{\incqno } |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
88 |
A sample line from a Comma Separated Values (CSV) file:\\ |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
89 |
\vspace*{0.2in} |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
90 |
\emph{Rossum, Guido, 42, 56, 34, 54}\\ |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
91 |
\vspace*{0.2in} |
306
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
92 |
What code would you use to separate the line into fields? |
261
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
93 |
\end{frame} |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
94 |
|
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
95 |
\begin{frame}[fragile] |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
96 |
\frametitle{\incqno } |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
97 |
\begin{lstlisting} |
306
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
98 |
In []: a = [1, 2, 5, 9] |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
99 |
In []: a[0:-1] |
261
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
100 |
\end{lstlisting} |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
101 |
What is the output? |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
102 |
\end{frame} |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
103 |
|
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
104 |
\begin{frame} |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
105 |
\frametitle{\incqno } |
306
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
106 |
How do you combine two lists \emph{a} and \emph{b} to produce one list? |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
107 |
\end{frame} |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
108 |
|
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
109 |
\begin{frame}[fragile] |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
110 |
\frametitle{\incqno } |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
111 |
\begin{lstlisting} |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
112 |
In []: a = [1, 2, 5, 9] |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
113 |
\end{lstlisting} |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
114 |
How do you add the value 10 to the end of this list? |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
115 |
\end{frame} |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
116 |
|
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
117 |
\begin{frame}[fragile] |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
118 |
\frametitle{\incqno } |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
119 |
\begin{lstlisting} |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
120 |
In []: a = [1, 2, 5, 9] |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
121 |
\end{lstlisting} |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
122 |
How do you find the length of this list? |
261
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
123 |
\end{frame} |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
124 |
|
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
125 |
\begin{frame}[fragile] |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
126 |
\frametitle{\incqno } |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
127 |
\begin{lstlisting} |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
128 |
In [1]: d = { |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
129 |
'a': 1, |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
130 |
'b': 2 |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
131 |
} |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
132 |
In [2]: print d['c'] |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
133 |
\end{lstlisting} |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
134 |
What is the output? |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
135 |
\end{frame} |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
136 |
|
306
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
137 |
%% \begin{frame}[fragile] |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
138 |
%% \frametitle{\incqno } |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
139 |
%% \begin{lstlisting} |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
140 |
%% for x in "abcd": |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
141 |
%% print x |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
142 |
|
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
143 |
%% a |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
144 |
%% b |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
145 |
%% c |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
146 |
%% d |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
147 |
%% \end{lstlisting} |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
148 |
%% How do you get the following output? |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
149 |
%% \begin{lstlisting} |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
150 |
%% 0 a |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
151 |
%% 1 b |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
152 |
%% 2 c |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
153 |
%% 3 d |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
154 |
%% \end{lstlisting} |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
155 |
%% \end{frame} |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
156 |
|
332
f2ca851199d4
Changed few questions in day1quiz1 and added day 2 quiz.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
263
diff
changeset
|
157 |
\begin{frame} |
261
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
158 |
\frametitle{\incqno } |
332
f2ca851199d4
Changed few questions in day1quiz1 and added day 2 quiz.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
263
diff
changeset
|
159 |
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? |
261
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
160 |
\end{frame} |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
161 |
|
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
162 |
\begin{frame} |
306
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
163 |
\begin{lstlisting} |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
164 |
In []: sc = {'A': 10, 'B': 20, |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
165 |
'C': 70} |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
166 |
\end{lstlisting} |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
167 |
Given the above dictionary, what command will you give to plot a |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
168 |
pie-chart? |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
169 |
\end{frame} |
261
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
170 |
|
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
171 |
|
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
172 |
\begin{frame}[fragile] |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
173 |
\frametitle{\incqno } |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
174 |
\begin{lstlisting} |
306
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
175 |
In []: marks = [10, 20, 30, 50, 55, |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
176 |
75, 83] |
261
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
177 |
\end{lstlisting} |
306
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
178 |
|
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
179 |
Given the above marks, how will you calculate the \alert{mean} and |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
180 |
\alert{standard deviation}? |
261
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
181 |
\end{frame} |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
182 |
|
306
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
183 |
%\begin{frame}[fragile] |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
184 |
%\frametitle{\incqno } |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
185 |
%\begin{lstlisting} |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
186 |
%In []: marks = [10, 20, 30, 50, 55, |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
187 |
% 75, 83] |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
188 |
%\end{lstlisting} |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
189 |
%How will you convert the list \texttt{marks} to an \alert{array}? |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
190 |
%\end{frame} |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
191 |
|
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
192 |
%% \begin{frame}[fragile] |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
193 |
%% \frametitle{\incqno } |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
194 |
%% \begin{lstlisting} |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
195 |
%% In []: a = array([[1, 2], |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
196 |
%% [3, 4]]) |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
197 |
%% In []: a[1,0] = 0 |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
198 |
%% \end{lstlisting} |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
199 |
%% What is the resulting matrix? |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
200 |
%% \end{frame} |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
201 |
|
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
202 |
%% \begin{frame}[fragile] |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
203 |
%% \frametitle{\incqno } |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
204 |
%% \begin{lstlisting} |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
205 |
%% In []: a = array([[1, 2], |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
206 |
%% [3, 4]]) |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
207 |
%% \end{lstlisting} |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
208 |
%% How do you get the transpose of this array? |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
209 |
%% \end{frame} |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
210 |
|
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
211 |
%% \begin{frame}[fragile] |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
212 |
%% \frametitle{\incqno } |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
213 |
%% \begin{lstlisting} |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
214 |
%% In []: a = array([[1, 2], |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
215 |
%% [3, 4]]) |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
216 |
%% In []: b = array([[1, 1], |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
217 |
%% [2, 2]]) |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
218 |
%% In []: a*b |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
219 |
%% \end{lstlisting} |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
220 |
%% What does this produce? |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
221 |
%% \end{frame} |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
222 |
|
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
223 |
%% \begin{frame} |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
224 |
%% \frametitle{\incqno } |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
225 |
%% What command do you use to find the inverse of a matrix and its |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
226 |
%% eigenvalues? |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
227 |
%% \end{frame} |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
228 |
|
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
229 |
%% \begin{frame} |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
230 |
%% \frametitle{\incqno } |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
231 |
%% Given a 4x4 matrix \texttt{A} and a 4-vector \texttt{b}, what command do |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
232 |
%% you use to solve for the equation \\ |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
233 |
%% \texttt{Ax = b}? |
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
234 |
%% \end{frame} |
261
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
235 |
|
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
236 |
\begin{frame} |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
237 |
\frametitle{\incqno } |
306
57291186d598
Updated the quiz tex files of both day 1 and day 2.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
263
diff
changeset
|
238 |
Write the code to read a file \texttt{data.txt} and print each line of it? |
261
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
239 |
\end{frame} |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
240 |
|
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
241 |
\begin{frame}[fragile] |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
242 |
\frametitle{\incqno } |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
243 |
What is the output of: |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
244 |
\begin{lstlisting} |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
245 |
In []: x=linspace(0 , 2 * pi) |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
246 |
In []: plot(x, cos(x),'go') |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
247 |
\end{lstlisting} |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
248 |
\end{frame} |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
249 |
|
263
8a4a1e5aec85
Changes made for Goa workshop .
Shantanu <shantanu@fossee.in>
parents:
261
diff
changeset
|
250 |
\begin{frame} |
8a4a1e5aec85
Changes made for Goa workshop .
Shantanu <shantanu@fossee.in>
parents:
261
diff
changeset
|
251 |
\frametitle{\incqno } |
8a4a1e5aec85
Changes made for Goa workshop .
Shantanu <shantanu@fossee.in>
parents:
261
diff
changeset
|
252 |
Draw a plot with line width 3. |
8a4a1e5aec85
Changes made for Goa workshop .
Shantanu <shantanu@fossee.in>
parents:
261
diff
changeset
|
253 |
\end{frame} |
8a4a1e5aec85
Changes made for Goa workshop .
Shantanu <shantanu@fossee.in>
parents:
261
diff
changeset
|
254 |
|
8a4a1e5aec85
Changes made for Goa workshop .
Shantanu <shantanu@fossee.in>
parents:
261
diff
changeset
|
255 |
\begin{frame} |
8a4a1e5aec85
Changes made for Goa workshop .
Shantanu <shantanu@fossee.in>
parents:
261
diff
changeset
|
256 |
\frametitle{\incqno } |
8a4a1e5aec85
Changes made for Goa workshop .
Shantanu <shantanu@fossee.in>
parents:
261
diff
changeset
|
257 |
Setting x and y axis limits. |
8a4a1e5aec85
Changes made for Goa workshop .
Shantanu <shantanu@fossee.in>
parents:
261
diff
changeset
|
258 |
\end{frame} |
8a4a1e5aec85
Changes made for Goa workshop .
Shantanu <shantanu@fossee.in>
parents:
261
diff
changeset
|
259 |
|
332
f2ca851199d4
Changed few questions in day1quiz1 and added day 2 quiz.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
263
diff
changeset
|
260 |
\begin{frame}[fragile] |
f2ca851199d4
Changed few questions in day1quiz1 and added day 2 quiz.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
263
diff
changeset
|
261 |
\frametitle{\incqno } |
f2ca851199d4
Changed few questions in day1quiz1 and added day 2 quiz.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
263
diff
changeset
|
262 |
The following code snippet has an error/bug: |
f2ca851199d4
Changed few questions in day1quiz1 and added day 2 quiz.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
263
diff
changeset
|
263 |
\begin{lstlisting} |
f2ca851199d4
Changed few questions in day1quiz1 and added day 2 quiz.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
263
diff
changeset
|
264 |
In []: l = [0.1, 0.2, 0.3, 0.4] |
f2ca851199d4
Changed few questions in day1quiz1 and added day 2 quiz.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
263
diff
changeset
|
265 |
In []: t = [0.69, 0.90, 1.19, 1.30] |
f2ca851199d4
Changed few questions in day1quiz1 and added day 2 quiz.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
263
diff
changeset
|
266 |
In []: tsq = [] |
f2ca851199d4
Changed few questions in day1quiz1 and added day 2 quiz.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
263
diff
changeset
|
267 |
In []: for time in t: |
f2ca851199d4
Changed few questions in day1quiz1 and added day 2 quiz.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
263
diff
changeset
|
268 |
....: tsq.append(time*time) |
f2ca851199d4
Changed few questions in day1quiz1 and added day 2 quiz.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
263
diff
changeset
|
269 |
....: plot(l, tsq) |
f2ca851199d4
Changed few questions in day1quiz1 and added day 2 quiz.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
263
diff
changeset
|
270 |
\end{lstlisting} |
f2ca851199d4
Changed few questions in day1quiz1 and added day 2 quiz.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
263
diff
changeset
|
271 |
|
f2ca851199d4
Changed few questions in day1quiz1 and added day 2 quiz.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
263
diff
changeset
|
272 |
What is the error? How do you fix it? |
f2ca851199d4
Changed few questions in day1quiz1 and added day 2 quiz.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
263
diff
changeset
|
273 |
\end{frame} |
263
8a4a1e5aec85
Changes made for Goa workshop .
Shantanu <shantanu@fossee.in>
parents:
261
diff
changeset
|
274 |
|
261
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
275 |
\end{document} |