summaryrefslogtreecommitdiff
path: root/day2
diff options
context:
space:
mode:
Diffstat (limited to 'day2')
-rwxr-xr-xday2/day2quiz.tex4
-rw-r--r--day2/session1.tex12
-rw-r--r--day2/session2.tex33
-rw-r--r--day2/session3.tex2
-rw-r--r--day2/session4.tex2
-rw-r--r--day2/session5.tex2
6 files changed, 30 insertions, 25 deletions
diff --git a/day2/day2quiz.tex b/day2/day2quiz.tex
index 5561d3d..c55f099 100755
--- a/day2/day2quiz.tex
+++ b/day2/day2quiz.tex
@@ -40,7 +40,7 @@
\author[FOSSEE Team] {FOSSEE}
\institute[IIT Bombay] {Department of Aerospace Engineering\\IIT Bombay}
-\date[] {\today \\ Day 2, Quiz 1}
+\date[] {\today \\ Day 2, Quiz}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -94,7 +94,7 @@ How do you create a complex number with real part 2 and imaginary part
\begin{frame}
\frametitle{\incqno }
- What does '*' * 40 produce?
+ What does 't' * 40 produce?
\end{frame}
\begin{frame}[fragile]
diff --git a/day2/session1.tex b/day2/session1.tex
index 5885994..b733b88 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[] {12 January, 2010\\Day 2, Session 1}
+\date[] {13 February, 2010\\Day 2, Session 3}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\pgfdeclareimage[height=0.75cm]{iitmlogo}{iitmlogo}
@@ -255,6 +255,7 @@ Out[]: 'hello world'
\begin{frame}[fragile]
\frametitle{A bit about IPython}
+ Recall, we showed a few features of IPython, here is one more:
\begin{itemize}
\item IPython provides better help
\item object.function?
@@ -262,10 +263,6 @@ Out[]: 'hello world'
In []: a = 'Hello World'
In []: a.lower?
\end{lstlisting}
- \item It provides tab completion
- \begin{lstlisting}
-In []: a.s<Tab>
- \end{lstlisting}
\end{itemize}
\end{frame}
@@ -278,6 +275,9 @@ In []: a.s<Tab>
\begin{lstlisting}
In []: ''.join(['a', 'b', 'c'])
Out[]: 'abc'
+
+In []: ', '.join(['a', 'b', 'c'])
+Out[]: 'a, b, c'
\end{lstlisting}
\end{frame}
@@ -511,7 +511,7 @@ Hello World
\subsection{Basic Conditional flow}
\begin{frame}[fragile]
\frametitle{\typ{If...elif...else} example}
-Type out the code below in an editor.
+Type the following code in an editor \& save as \alert{ladder.py}
\small
\begin{lstlisting}
x = int(raw_input("Enter an integer:"))
diff --git a/day2/session2.tex b/day2/session2.tex
index c64ca87..a4b8f10 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[] {12 January, 2010\\Day 2, Session 2}
+\date[] {13 February, 2010\\Day 3, Session 1}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\pgfdeclareimage[height=0.75cm]{iitmlogo}{iitmlogo}
@@ -208,19 +208,6 @@ In []: for i in range(3, 10, 2):
\item It appears that for all starting values there is a cycle of 4, 2, 1 at which the procedure loops.
\end{enumerate}
Write a program that accepts the starting value and prints out the Collatz sequence.
-\end{frame}
-
-\begin{frame}[fragile]{Problem 1.3}
- Write a program that prints the following pyramid on the screen.
- \begin{lstlisting}
-1
-2 2
-3 3 3
-4 4 4 4
- \end{lstlisting}
-The number of lines must be obtained from the user.\\
-\pause
-\emphbar{When can your code fail?}
\inctime{5}
\end{frame}
@@ -519,6 +506,24 @@ def what( n ):
\end{lstlisting}
\end{frame}
+\begin{frame}[fragile]
+ \frametitle {What does this function do?}
+ \begin{lstlisting}
+def what( x, n ):
+ if n < 0:
+ n = -n
+ x = 1.0 / x
+
+ z = 1.0
+ while n > 0:
+ if n % 2 == 1:
+ z *= x
+ x *= x
+ n /= 2
+ return z
+ \end{lstlisting}
+\end{frame}
+
\begin{frame}
\frametitle{What did we learn?}
\begin{itemize}
diff --git a/day2/session3.tex b/day2/session3.tex
index 8b2a12f..392a3e5 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[] {12 January, 2010\\Day 2, Session 3}
+\date[] {13 February, 2010\\Day 3, Session 2}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\pgfdeclareimage[height=0.75cm]{iitmlogo}{iitmlogo}
diff --git a/day2/session4.tex b/day2/session4.tex
index eb89a2a..a425456 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[] {12 January, 2010\\Day 2, Session 4}
+\date[] {13 February, 2010\\Day 3, Session 4}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\pgfdeclareimage[height=0.75cm]{iitblogo}{iitblogo}
diff --git a/day2/session5.tex b/day2/session5.tex
index abbd2af..c22c143 100644
--- a/day2/session5.tex
+++ b/day2/session5.tex
@@ -78,7 +78,7 @@
\author[FOSSEE] {FOSSEE}
\institute[IIT Bombay] {Department of Aerospace Engineering\\IIT Bombay}
-\date[] {12 January, 2010\\Day 2, Session 5}
+\date[] {13 February, 2010\\Day 3, Session 3}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\pgfdeclareimage[height=0.75cm]{iitmlogo}{iitmlogo}