getting-started-with-lists/slides.org
changeset 441 430035b678f7
parent 406 a534e9e79599
equal deleted inserted replaced
434:c8ffd52305ff 441:430035b678f7
     1 #+LaTeX_CLASS: beamer
     1 #+LaTeX_CLASS: beamer
     2 #+LaTeX_CLASS_OPTIONS: [presentation]
     2 #+LaTeX_CLASS_OPTIONS: [presentation]
     3 #+BEAMER_FRAME_LEVEL: 1
     3 #+BEAMER_FRAME_LEVEL: 1
     4 
     4 
     5 #+BEAMER_HEADER_EXTRA: \usetheme{Warsaw}\useoutertheme{infolines}\usecolortheme{default}\setbeamercovered{transparent}
     5 #+BEAMER_HEADER_EXTRA: \usetheme{Warsaw}\usecolortheme{default}\useoutertheme{infolines}\setbeamercovered{transparent}
     6 #+COLUMNS: %45ITEM %10BEAMER_env(Env) %10BEAMER_envargs(Env Args) %4BEAMER_col(Col) %8BEAMER_extra(Extra)
     6 #+COLUMNS: %45ITEM %10BEAMER_env(Env) %10BEAMER_envargs(Env Args) %4BEAMER_col(Col) %8BEAMER_extra(Extra)
     7 #+PROPERTY: BEAMER_col_ALL 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 :ETC
     7 #+PROPERTY: BEAMER_col_ALL 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 :ETC
     8 #+OPTIONS:   H:5 num:t toc:nil \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t
     8 
       
     9 #+LaTeX_CLASS: beamer
       
    10 #+LaTeX_CLASS_OPTIONS: [presentation]
       
    11 
       
    12 #+LaTeX_HEADER: \usepackage[english]{babel} \usepackage{ae,aecompl}
       
    13 #+LaTeX_HEADER: \usepackage{mathpazo,courier,euler} \usepackage[scaled=.95]{helvet}
       
    14 
       
    15 #+LaTeX_HEADER: \usepackage{listings}
       
    16 
       
    17 #+LaTeX_HEADER:\lstset{language=Python, basicstyle=\ttfamily\bfseries,
       
    18 #+LaTeX_HEADER:  commentstyle=\color{red}\itshape, stringstyle=\color{darkgreen},
       
    19 #+LaTeX_HEADER:  showstringspaces=false, keywordstyle=\color{blue}\bfseries}
     9 
    20 
    10 #+TITLE: Getting started with Lists
    21 #+TITLE: Getting started with Lists
    11 #+AUTHOR: FOSSEE
    22 #+AUTHOR: FOSSEE
    12 #+DATE: 2010-09-14 Tue
    23 #+DATE: 2010-09-14 Tue
    13 #+EMAIL:     info@fossee.in
    24 #+EMAIL:     info@fossee.in
    14 
    25 
    15 # \author[FOSSEE] {FOSSEE}
    26 #+DESCRIPTION: 
    16 
    27 #+KEYWORDS: 
    17 # \institute[IIT Bombay] {Department of Aerospace Engineering\\IIT Bombay}
    28 #+LANGUAGE:  en
    18 # \date{}
    29 #+OPTIONS:   H:3 num:nil toc:nil \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t
    19 
    30 #+OPTIONS:   TeX:t LaTeX:nil skip:nil d:nil todo:nil pri:nil tags:not-in-toc
    20 * Tutorial Plan 
       
    21 ** How to create lists
       
    22 ** Structure of lists  
       
    23 ** Access list elements
       
    24 ** Append elements to lists
       
    25 ** Deleting elements from lists
       
    26 
    31 
    27 
    32 
       
    33 * Outline 
       
    34  - How to create lists
       
    35  - Structure of lists  
       
    36  - Access list elements
       
    37  - Append elements to lists
       
    38  - Deleting elements from lists
       
    39 
       
    40 
       
    41 * Question 1 
       
    42   - What happens when you do nonempty[-1].
       
    43 
       
    44 * Solution 1
       
    45   - It gives the last element , 1.234
       
    46 
       
    47 * Questions
       
    48   - What is the syntax to get the element 'and' 
       
    49 in the list,listinlist ?
       
    50 
       
    51 
       
    52   - How would you get 'and' using negative indices?
       
    53 
       
    54 * Solutions
       
    55 #+begin_src python
       
    56   
       
    57   listinlist[1]
       
    58   listinlist[-5]
       
    59 
       
    60 #+end_src python
       
    61 * Questions
       
    62 
       
    63   - Remove the third element from the list, listinlist.   
       
    64 
       
    65   - Remove 'and' from the list, listinlist.
       
    66 
       
    67 * Solutions
       
    68 #+begin_src python
       
    69   
       
    70   del(listinlist[2])
       
    71   listinlist.remove('and')
       
    72 
       
    73 #+end_src python
    28 * Summary
    74 * Summary
    29 
    75 #+begin_src python
       
    76   
    30   l=[1,2,3,4]
    77   l=[1,2,3,4]
    31   l[-1]
    78   l[-1]
    32   l.append(5)
    79   l.append(5)
    33   del(l[2])
    80   del(l[2])
       
    81   l.remove(2)
    34   len(l)
    82   len(l)
    35 
    83 
       
    84 #+end_src python
       
    85 * Thank you!
       
    86 #+begin_latex
       
    87   \begin{block}{}
       
    88   \begin{center}
       
    89   This spoken tutorial has been produced by the
       
    90   \textcolor{blue}{FOSSEE} team, which is funded by the 
       
    91   \end{center}
       
    92   \begin{center}
       
    93     \textcolor{blue}{National Mission on Education through \\
       
    94       Information \& Communication Technology \\ 
       
    95       MHRD, Govt. of India}.
       
    96   \end{center}  
       
    97   \end{block}
       
    98 #+end_latex
       
    99 
       
   100