tuples/slides.org
author bhanu
Mon, 08 Nov 2010 01:34:02 +0530
changeset 454 0c69c2b32183
parent 282 8c35d7977f04
permissions -rw-r--r--
Language check done for the script `strings`
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
282
8c35d7977f04 Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
     1
#+LaTeX_CLASS: beamer
8c35d7977f04 Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
     2
#+LaTeX_CLASS_OPTIONS: [presentation]
8c35d7977f04 Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
     3
#+BEAMER_FRAME_LEVEL: 1
8c35d7977f04 Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
     4
8c35d7977f04 Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
     5
#+BEAMER_HEADER_EXTRA: \usetheme{Warsaw}\usecolortheme{default}\useoutertheme{infolines}\setbeamercovered{transparent}
8c35d7977f04 Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
     6
#+COLUMNS: %45ITEM %10BEAMER_env(Env) %10BEAMER_envargs(Env Args) %4BEAMER_col(Col) %8BEAMER_extra(Extra)
8c35d7977f04 Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
     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
8c35d7977f04 Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
     8
8c35d7977f04 Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
     9
#+LaTeX_CLASS: beamer
8c35d7977f04 Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    10
#+LaTeX_CLASS_OPTIONS: [presentation]
8c35d7977f04 Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    11
8c35d7977f04 Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    12
#+LaTeX_HEADER: \usepackage[english]{babel} \usepackage{ae,aecompl}
8c35d7977f04 Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    13
#+LaTeX_HEADER: \usepackage{mathpazo,courier,euler} \usepackage[scaled=.95]{helvet}
8c35d7977f04 Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    14
8c35d7977f04 Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    15
#+LaTeX_HEADER: \usepackage{listings}
8c35d7977f04 Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    16
8c35d7977f04 Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    17
#+LaTeX_HEADER:\lstset{language=Python, basicstyle=\ttfamily\bfseries,
8c35d7977f04 Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    18
#+LaTeX_HEADER:  commentstyle=\color{red}\itshape, stringstyle=\color{darkgreen},
8c35d7977f04 Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    19
#+LaTeX_HEADER:  showstringspaces=false, keywordstyle=\color{blue}\bfseries}
8c35d7977f04 Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    20
8c35d7977f04 Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    21
#+TITLE:    Getting started -- Tuples
8c35d7977f04 Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    22
#+AUTHOR:    FOSSEE
8c35d7977f04 Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    23
#+EMAIL:     
8c35d7977f04 Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    24
#+DATE:    
8c35d7977f04 Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    25
8c35d7977f04 Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    26
#+DESCRIPTION: 
8c35d7977f04 Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    27
#+KEYWORDS: 
8c35d7977f04 Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    28
#+LANGUAGE:  en
8c35d7977f04 Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    29
#+OPTIONS:   H:3 num:nil toc:nil \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t
8c35d7977f04 Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    30
#+OPTIONS:   TeX:t LaTeX:nil skip:nil d:nil todo:nil pri:nil tags:not-in-toc
8c35d7977f04 Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    31
8c35d7977f04 Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    32
* Outline
8c35d7977f04 Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    33
  - what are tuples
8c35d7977f04 Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    34
  - comparison with lists
8c35d7977f04 Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    35
  - why are they needed
8c35d7977f04 Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    36
* Question 1
8c35d7977f04 Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    37
  ~a = 5~ and ~b = 7~. swap the values of ~a~ and ~b~
8c35d7977f04 Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    38
* Solution 1
8c35d7977f04 Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    39
  #+begin_src python
8c35d7977f04 Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    40
    temp = a
8c35d7977f04 Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    41
    a = b
8c35d7977f04 Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    42
    b = temp
8c35d7977f04 Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    43
    
8c35d7977f04 Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    44
    a
8c35d7977f04 Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    45
    b
8c35d7977f04 Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    46
  #+end_src
8c35d7977f04 Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    47
* Summary
8c35d7977f04 Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    48
  You should now --
8c35d7977f04 Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    49
  + Be able to define tuples
8c35d7977f04 Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    50
  + Know the similarities with lists, like -- indexing and iterability
8c35d7977f04 Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    51
  + Know about the immutability of tuples
8c35d7977f04 Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    52
  + Be able to swap variables in the Pythonic way
8c35d7977f04 Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    53
  + Know about packing and unpacking of tuples
8c35d7977f04 Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    54
* Thank you!
8c35d7977f04 Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    55
#+begin_latex
8c35d7977f04 Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    56
  \begin{block}{}
8c35d7977f04 Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    57
  \begin{center}
8c35d7977f04 Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    58
  This spoken tutorial has been produced by the
8c35d7977f04 Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    59
  \textcolor{blue}{FOSSEE} team, which is funded by the 
8c35d7977f04 Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    60
  \end{center}
8c35d7977f04 Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    61
  \begin{center}
8c35d7977f04 Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    62
    \textcolor{blue}{National Mission on Education through \\
8c35d7977f04 Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    63
      Information \& Communication Technology \\ 
8c35d7977f04 Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    64
      MHRD, Govt. of India}.
8c35d7977f04 Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    65
  \end{center}  
8c35d7977f04 Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    66
  \end{block}
8c35d7977f04 Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    67
#+end_latex
8c35d7977f04 Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    68
8c35d7977f04 Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    69