equal
deleted
inserted
replaced
77 \title[Basic Python]{Python language: Basics} |
77 \title[Basic Python]{Python language: Basics} |
78 |
78 |
79 \author[FOSSEE Team] {The FOSSEE Group} |
79 \author[FOSSEE Team] {The FOSSEE Group} |
80 |
80 |
81 \institute[IIT Bombay] {Department of Aerospace Engineering\\IIT Bombay} |
81 \institute[IIT Bombay] {Department of Aerospace Engineering\\IIT Bombay} |
82 \date[] {29 January, 2010\\Day 2, Session 1} |
82 \date[] {13 February, 2010\\Day 2, Session 3} |
83 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
83 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
84 |
84 |
85 %\pgfdeclareimage[height=0.75cm]{iitmlogo}{iitmlogo} |
85 %\pgfdeclareimage[height=0.75cm]{iitmlogo}{iitmlogo} |
86 %\logo{\pgfuseimage{iitmlogo}} |
86 %\logo{\pgfuseimage{iitmlogo}} |
87 |
87 |
273 \item join() is the opposite of split() |
273 \item join() is the opposite of split() |
274 \end{itemize} |
274 \end{itemize} |
275 \begin{lstlisting} |
275 \begin{lstlisting} |
276 In []: ''.join(['a', 'b', 'c']) |
276 In []: ''.join(['a', 'b', 'c']) |
277 Out[]: 'abc' |
277 Out[]: 'abc' |
|
278 |
|
279 In []: ', '.join(['a', 'b', 'c']) |
|
280 Out[]: 'a, b, c' |
278 \end{lstlisting} |
281 \end{lstlisting} |
279 \end{frame} |
282 \end{frame} |
280 |
283 |
281 \begin{frame}[fragile] |
284 \begin{frame}[fragile] |
282 \frametitle{String formatting} |
285 \frametitle{String formatting} |
506 \end{frame} |
509 \end{frame} |
507 |
510 |
508 \subsection{Basic Conditional flow} |
511 \subsection{Basic Conditional flow} |
509 \begin{frame}[fragile] |
512 \begin{frame}[fragile] |
510 \frametitle{\typ{If...elif...else} example} |
513 \frametitle{\typ{If...elif...else} example} |
511 Type out the code below in an editor. |
514 Type the following code in an editor \& save as \alert{ladder.py} |
512 \small |
515 \small |
513 \begin{lstlisting} |
516 \begin{lstlisting} |
514 x = int(raw_input("Enter an integer:")) |
517 x = int(raw_input("Enter an integer:")) |
515 if x < 0: |
518 if x < 0: |
516 print 'Be positive!' |
519 print 'Be positive!' |