author | Puneeth Chaganti <punchagan@fossee.in> |
Thu, 05 Nov 2009 22:37:50 +0530 | |
changeset 282 | b2dafce03b8d |
parent 263 | 8a4a1e5aec85 |
child 306 | 57291186d598 |
child 332 | f2ca851199d4 |
permissions | -rw-r--r-- |
261
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
1 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
2 |
% Tutorial slides on Python. |
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 |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
38 |
\title[Basic Python]{Python: Quiz} |
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} |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
43 |
\date[] {31, October 2009\\Day 1, Quiz 1} |
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} |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
57 |
\item Name: |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
58 |
\item Affliation: |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
59 |
\item Occupation: |
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 |
|
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
63 |
\begin{frame} |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
64 |
\frametitle{\incqno } |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
65 |
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
|
66 |
\vspace*{0.2in} |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
67 |
\emph{Rossum, Guido, 42, 56, 34, 54}\\ |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
68 |
\vspace*{0.2in} |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
69 |
What method would you use to separate the line into fields? |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
70 |
\end{frame} |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
71 |
|
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
72 |
\begin{frame}[fragile] |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
73 |
\frametitle{\incqno } |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
74 |
\begin{lstlisting} |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
75 |
In [1]: a = [1, 2, 5, 9] |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
76 |
In [2]: a[:-1] |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
77 |
\end{lstlisting} |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
78 |
What is the output? |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
79 |
\end{frame} |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
80 |
|
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
81 |
\begin{frame} |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
82 |
\frametitle{\incqno } |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
83 |
How do you combine the two lists \emph{a} and \emph{b}? |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
84 |
\end{frame} |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
85 |
|
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
86 |
\begin{frame}[fragile] |
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 |
\begin{lstlisting} |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
89 |
In [1]: d = { |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
90 |
'a': 1, |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
91 |
'b': 2 |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
92 |
} |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
93 |
In [2]: print d['c'] |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
94 |
\end{lstlisting} |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
95 |
What is the output? |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
96 |
\end{frame} |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
97 |
|
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
98 |
\begin{frame}[fragile] |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
99 |
\frametitle{\incqno } |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
100 |
\begin{lstlisting} |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
101 |
for x in "abcd": |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
102 |
print x |
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 |
a |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
105 |
b |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
106 |
c |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
107 |
d |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
108 |
\end{lstlisting} |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
109 |
How do you get the following output? |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
110 |
\begin{lstlisting} |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
111 |
0 a |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
112 |
1 b |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
113 |
2 c |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
114 |
3 d |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
115 |
\end{lstlisting} |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
116 |
\end{frame} |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
117 |
|
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
118 |
\begin{frame}[fragile] |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
119 |
\frametitle{\incqno } |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
120 |
What would be the result? |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
121 |
\begin{lstlisting} |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
122 |
In [1]: x |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
123 |
array([[0, 1, 2], |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
124 |
[3, 4, 5], |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
125 |
[6, 7, 8]]) |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
126 |
In [2]: x[::-1,:] |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
127 |
\end{lstlisting} |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
128 |
\end{frame} |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
129 |
|
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
130 |
\begin{frame} |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
131 |
\frametitle{\incqno } |
263
8a4a1e5aec85
Changes made for Goa workshop .
Shantanu <shantanu@fossee.in>
parents:
261
diff
changeset
|
132 |
How to read and print each line of a file. |
261
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
133 |
\end{frame} |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
134 |
|
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
135 |
\begin{frame} |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
136 |
\frametitle{\incqno } |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
137 |
How to get list of third column of a data file. |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
138 |
\end{frame} |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
139 |
|
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
140 |
\begin{frame}[fragile] |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
141 |
\frametitle{\incqno } |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
142 |
What is the output of: |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
143 |
\begin{lstlisting} |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
144 |
In []: x=linspace(0 , 2 * pi) |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
145 |
In []: plot(x, cos(x),'go') |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
146 |
\end{lstlisting} |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
147 |
\end{frame} |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
148 |
|
263
8a4a1e5aec85
Changes made for Goa workshop .
Shantanu <shantanu@fossee.in>
parents:
261
diff
changeset
|
149 |
\begin{frame} |
8a4a1e5aec85
Changes made for Goa workshop .
Shantanu <shantanu@fossee.in>
parents:
261
diff
changeset
|
150 |
\frametitle{\incqno } |
8a4a1e5aec85
Changes made for Goa workshop .
Shantanu <shantanu@fossee.in>
parents:
261
diff
changeset
|
151 |
Draw a plot with line width 3. |
8a4a1e5aec85
Changes made for Goa workshop .
Shantanu <shantanu@fossee.in>
parents:
261
diff
changeset
|
152 |
\end{frame} |
8a4a1e5aec85
Changes made for Goa workshop .
Shantanu <shantanu@fossee.in>
parents:
261
diff
changeset
|
153 |
|
8a4a1e5aec85
Changes made for Goa workshop .
Shantanu <shantanu@fossee.in>
parents:
261
diff
changeset
|
154 |
\begin{frame} |
8a4a1e5aec85
Changes made for Goa workshop .
Shantanu <shantanu@fossee.in>
parents:
261
diff
changeset
|
155 |
\frametitle{\incqno } |
8a4a1e5aec85
Changes made for Goa workshop .
Shantanu <shantanu@fossee.in>
parents:
261
diff
changeset
|
156 |
Setting x and y axis limits. |
8a4a1e5aec85
Changes made for Goa workshop .
Shantanu <shantanu@fossee.in>
parents:
261
diff
changeset
|
157 |
\end{frame} |
8a4a1e5aec85
Changes made for Goa workshop .
Shantanu <shantanu@fossee.in>
parents:
261
diff
changeset
|
158 |
|
261
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
159 |
\end{document} |
9cce24d00957
1 quiz, seesion5 plots, added links to reference.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
160 |