summaryrefslogtreecommitdiff
path: root/day2
diff options
context:
space:
mode:
authorSantosh G. Vattam2010-01-05 15:23:02 +0530
committerSantosh G. Vattam2010-01-05 15:23:02 +0530
commit40143d0f21438479e204f8c415698fe7c9ac36fe (patch)
tree01ab9ea0019ca45828493ce373737f38240e9279 /day2
parente60b5c2290e99fb20d141be90ed5655335a1e8e9 (diff)
parent0b19439dc11ce0c1b09f82eec22e773cca815e11 (diff)
downloadworkshops-40143d0f21438479e204f8c415698fe7c9ac36fe.tar.gz
workshops-40143d0f21438479e204f8c415698fe7c9ac36fe.tar.bz2
workshops-40143d0f21438479e204f8c415698fe7c9ac36fe.zip
Branches merged.
Diffstat (limited to 'day2')
-rwxr-xr-xday2/cheatsheet1.tex2
-rw-r--r--day2/cheatsheet2.tex2
-rw-r--r--day2/cheatsheet3.tex14
-rw-r--r--day2/exercises.tex2
-rw-r--r--day2/session1.tex2
-rw-r--r--day2/session2.tex4
-rw-r--r--day2/session3.tex4
-rw-r--r--day2/session4.tex4
-rw-r--r--day2/session5.tex2
9 files changed, 18 insertions, 18 deletions
diff --git a/day2/cheatsheet1.tex b/day2/cheatsheet1.tex
index 22289b3..6ddb1ee 100755
--- a/day2/cheatsheet1.tex
+++ b/day2/cheatsheet1.tex
@@ -108,7 +108,7 @@ In []: x, y = 1, 1.234 #initializing two variables
In []: 'x is %s, y is %s' %(x, y)
Out[]: 'x is 1, y is 1.234'
\end{lstlisting}
-\textbf{Note:} \typ{\%s} used in above fomatting specifies \typ{'str'} representation of variables. One can also try:\\
+\textbf{Note:} \typ{\%s} used in above formatting specifies \typ{'str'} representation of variables. One can also try:\\
\typ{\%d} for \typ{int} representation\\
\typ{\%f} for \typ{float} representation
\begin{lstlisting}
diff --git a/day2/cheatsheet2.tex b/day2/cheatsheet2.tex
index bb5762a..ece16b8 100644
--- a/day2/cheatsheet2.tex
+++ b/day2/cheatsheet2.tex
@@ -193,7 +193,7 @@ Tuples are sequences just like Lists, but they are \textbf{immutable}, or items/
\begin{lstlisting}
In []: t = (1, 2, 3, 4, 5, 6, 7, 8)
\end{lstlisting}
-\textbf{Note:} For tupels we use parantheses in place of square brackets, rest is same as lists.
+\textbf{Note:} For tuples we use parentheses in place of square brackets, rest is same as lists.
\begin{lstlisting}
In []: t[0] + t[3] + t[-1] # elements are accessed via indices
Out[]: 13
diff --git a/day2/cheatsheet3.tex b/day2/cheatsheet3.tex
index 293b95e..808fa6e 100644
--- a/day2/cheatsheet3.tex
+++ b/day2/cheatsheet3.tex
@@ -50,7 +50,7 @@ In []: signum(-4)
Out[]: -1
In []: signum() # ERROR signum() takes exactly 1 argument(0 given)
\end{lstlisting}
-\textbf{Note:} Arguments passed to a function are passed by-value \textbf{only if} they are basic Python data type(int, float). In case one passes immutable types(String, tupels), they cant be modified in the function, but objects like \typ{list} and dictionary can be manipulated.
+\textbf{Note:} Arguments passed to a function are passed by-value \textbf{only if} they are basic Python data type(int, float). In case one passes immutable types(String, tuples), they cant be modified in the function, but objects like \typ{list} and dictionary can be manipulated.
\subsection{Default Arguments}
This feature allow the functions to take the arguments optionally. For example:
\begin{lstlisting}
@@ -80,12 +80,12 @@ In []: welcome("Hi", "Guido") #taking name via argument
Hi Guido
\end{lstlisting}
\subsection{Keyword Arguments}
-This feature provides the facility of passing arguments by specifying the name of the parameter as defined in the function definition. You dont have to remember the order of the parameters in function definition. For example:
+This feature provides the facility of passing arguments by specifying the name of the parameter as defined in the function definition. You don't have to remember the order of the parameters in function definition. For example:
\begin{lstlisting}
In []: plot(y, sin(y), 'g', linewidth=2)
In []: plot(y, cos(y), linewidth=1, color='g')
\end{lstlisting}
-Both call to \typ{plot} function will work and paramenters are set accordingly.\\
+Both call to \typ{plot} function will work and parameters are set accordingly.\\
One can define a function such that keyword arguments can be used in following way:
\begin{lstlisting}
def wish(name='World', greetings='Hello'):
@@ -97,8 +97,8 @@ In [13]: wish() #default arguments will work
Hello World
In [14]: wish(greetings='hey', name='madhu')
hey madhu
-In [15]: wish(name='vattam', greetings = 'get lost')
-get lost vattam
+In [15]: wish(name='vattam', greetings = 'bye bye')
+bye bye vattam
\end{lstlisting}
% sorry Vattam just a joke :P
\section{Self contained python script}
@@ -130,13 +130,13 @@ In Python everything is a object! All variables, lists, tuples, dictionaries and
\begin{lstlisting}
In []: a = str() # initializing a string object.
In []: b = "Hello World"
-In []: b.split() # calling funciton on object 'b'
+In []: b.split() # calling function on object 'b'
Out[]: ['Hello', 'World']
\end{lstlisting}
``.'' is a operator used to call functions defined for given object.
\section{Links and References}
\begin{itemize}
-\item Some of inbult functions available with Python are listed at\\ \url{http://docs.python.org/library/functions.html}
+\item Some of inbuilt functions available with Python are listed at\\ \url{http://docs.python.org/library/functions.html}
\item Reference manual to describe the standard libraries that are distributed with Python is available at \url{http://docs.python.org/library/}
\end{itemize}
\end{document}
diff --git a/day2/exercises.tex b/day2/exercises.tex
index 6c3fd19..7cbf437 100644
--- a/day2/exercises.tex
+++ b/day2/exercises.tex
@@ -78,7 +78,7 @@
\author[FOSSEE] {FOSSEE}
\institute[IIT Bombay] {Department of Aerospace Engineering\\IIT Bombay}
-\date[] {8 November, 2009\\Day 2}
+\date[] {12 January, 2010\\Day 2}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\pgfdeclareimage[height=0.75cm]{iitmlogo}{iitmlogo}
diff --git a/day2/session1.tex b/day2/session1.tex
index df67b5c..8d7c70e 100644
--- a/day2/session1.tex
+++ b/day2/session1.tex
@@ -79,7 +79,7 @@
\author[FOSSEE Team] {The FOSSEE Group}
\institute[IIT Bombay] {Department of Aerospace Engineering\\IIT Bombay}
-\date[] {8 November, 2009\\Day 2, Session 1}
+\date[] {12 January, 2010\\Day 2, Session 1}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\pgfdeclareimage[height=0.75cm]{iitmlogo}{iitmlogo}
diff --git a/day2/session2.tex b/day2/session2.tex
index 14fe857..d40f9d2 100644
--- a/day2/session2.tex
+++ b/day2/session2.tex
@@ -78,7 +78,7 @@
\author[FOSSEE Team] {The FOSSEE Group}
\institute[IIT Bombay] {Department of Aerospace Engineering\\IIT Bombay}
-\date[] {8 November, 2009\\Day 2, Session 2}
+\date[] {12 January, 2010\\Day 2, Session 2}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\pgfdeclareimage[height=0.75cm]{iitmlogo}{iitmlogo}
@@ -535,4 +535,4 @@ def what( n ):
\end{itemize}
\end{frame}
-\end{document} \ No newline at end of file
+\end{document}
diff --git a/day2/session3.tex b/day2/session3.tex
index 068f17e..97ecf59 100644
--- a/day2/session3.tex
+++ b/day2/session3.tex
@@ -78,7 +78,7 @@
\author[FOSSEE Team] {The FOSSEE Group}
\institute[IIT Bombay] {Department of Aerospace Engineering\\IIT Bombay}
-\date[] {8 November, 2009\\Day 2, Session 3}
+\date[] {12 January, 2010\\Day 2, Session 3}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\pgfdeclareimage[height=0.75cm]{iitmlogo}{iitmlogo}
@@ -431,4 +431,4 @@ for line in urllib2.urlopen('http://site.com'):
\end{itemize}
\end{frame}
-\end{document} \ No newline at end of file
+\end{document}
diff --git a/day2/session4.tex b/day2/session4.tex
index f401d8d..7345b7e 100644
--- a/day2/session4.tex
+++ b/day2/session4.tex
@@ -100,7 +100,7 @@
\author[FOSSEE] {FOSSEE}
\institute[IIT Bombay] {Department of Aerospace Engineering\\IIT Bombay}
-\date[] {8 November, 2009\\Day 2, Session 4}
+\date[] {12 January, 2010\\Day 2, Session 4}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\pgfdeclareimage[height=0.75cm]{iitblogo}{iitblogo}
@@ -553,4 +553,4 @@ We have covered:
% %% \end{block}
%
% %% \inctime{15}
-% %% \end{frame} \ No newline at end of file
+% %% \end{frame}
diff --git a/day2/session5.tex b/day2/session5.tex
index a3e63e8..1d0612c 100644
--- a/day2/session5.tex
+++ b/day2/session5.tex
@@ -100,7 +100,7 @@
\author[FOSSEE] {FOSSEE}
\institute[IIT Bombay] {Department of Aerospace Engineering\\IIT Bombay}
-\date[] {8 November, 2009\\Day 2, Session 5}
+\date[] {12 January, 2010\\Day 2, Session 5}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%