getting-started-with-lists/slides.tex
changeset 441 430035b678f7
parent 430 7b2275daab60
equal deleted inserted replaced
434:c8ffd52305ff 441:430035b678f7
     1 % Created 2010-11-09 Tue 17:41
     1 % Created 2010-11-10 Wed 12:22
     2 \documentclass[presentation]{beamer}
     2 \documentclass[presentation]{beamer}
     3 \usepackage[latin1]{inputenc}
     3 \usepackage[latin1]{inputenc}
     4 \usepackage[T1]{fontenc}
     4 \usepackage[T1]{fontenc}
     5 \usepackage{fixltx2e}
     5 \usepackage{fixltx2e}
     6 \usepackage{graphicx}
     6 \usepackage{graphicx}
    14 \usepackage{wasysym}
    14 \usepackage{wasysym}
    15 \usepackage{latexsym}
    15 \usepackage{latexsym}
    16 \usepackage{amssymb}
    16 \usepackage{amssymb}
    17 \usepackage{hyperref}
    17 \usepackage{hyperref}
    18 \tolerance=1000
    18 \tolerance=1000
       
    19 \usepackage[english]{babel} \usepackage{ae,aecompl}
       
    20 \usepackage{mathpazo,courier,euler} \usepackage[scaled=.95]{helvet}
       
    21 \usepackage{listings}
       
    22 \lstset{language=Python, basicstyle=\ttfamily\bfseries,
       
    23 commentstyle=\color{red}\itshape, stringstyle=\color{darkgreen},
       
    24 showstringspaces=false, keywordstyle=\color{blue}\bfseries}
    19 \providecommand{\alert}[1]{\textbf{#1}}
    25 \providecommand{\alert}[1]{\textbf{#1}}
    20 
    26 
    21 \title{Getting started with Lists}
    27 \title{Getting started with Lists}
    22 \author{FOSSEE}
    28 \author{FOSSEE}
    23 \date{2010-09-14 Tue}
    29 \date{2010-09-14 Tue}
    24 
    30 
    25 \usetheme{Warsaw}\useoutertheme{infolines}\usecolortheme{default}\setbeamercovered{transparent}
    31 \usetheme{Warsaw}\usecolortheme{default}\useoutertheme{infolines}\setbeamercovered{transparent}
    26 \begin{document}
    32 \begin{document}
    27 
    33 
    28 \maketitle
    34 \maketitle
    29 
    35 
    30 
    36 
    31 
    37 
    32 
    38 
    33 
    39 
    34 
    40 
       
    41 
       
    42 
       
    43 
       
    44 
    35 \begin{frame}
    45 \begin{frame}
    36 \frametitle{Tutorial Plan}
    46 \frametitle{Outline}
    37 \label{sec-1}
    47 \label{sec-1}
       
    48 
    38 \begin{itemize}
    49 \begin{itemize}
    39 
    50 \item How to create lists
    40 \item How to create lists\\
    51 \item Structure of lists
    41 \label{sec-1_1}%
    52 \item Access list elements
    42 \item Structure of lists\\
    53 \item Append elements to lists
    43 \label{sec-1_2}%
    54 \item Deleting elements from lists
    44 \item Access list elements\\
    55 \end{itemize}
    45 \label{sec-1_3}%
       
    46 \item Append elements to lists\\
       
    47 \label{sec-1_4}%
       
    48 \item Deleting elements from lists\\
       
    49 \label{sec-1_5}%
       
    50 \end{itemize} % ends low level
       
    51 \end{frame}
    56 \end{frame}
    52 \begin{frame}
    57 \begin{frame}
    53 \frametitle{Summary}
    58 \frametitle{Question 1}
    54 \label{sec-2}
    59 \label{sec-2}
    55 
    60 
       
    61 \begin{itemize}
       
    62 \item What happens when you do nonempty[-1].
       
    63 \end{itemize}
       
    64 \end{frame}
       
    65 \begin{frame}
       
    66 \frametitle{Solution 1}
       
    67 \label{sec-3}
    56 
    68 
    57   l=[1,2,3,4]
    69 \begin{itemize}
    58   l[-1]
    70 \item It gives the last element , 1.234
    59   l.append(5)
    71 \end{itemize}
    60   del(l\footnote{FOOTNOTE DEFINITION NOT FOUND: 2 })
    72 \end{frame}
    61   len(l)
    73 \begin{frame}
       
    74 \frametitle{Questions}
       
    75 \label{sec-4}
       
    76 
       
    77 \begin{itemize}
       
    78 \item What is the syntax to get the element `and'
       
    79 \end{itemize}
       
    80 
       
    81 in the list,listinlist ?
       
    82 
       
    83 
       
    84 \begin{itemize}
       
    85 \item How would you get `and' using negative indices?
       
    86 \end{itemize}
       
    87 \end{frame}
       
    88 \begin{frame}[fragile]
       
    89 \frametitle{Solutions}
       
    90 \label{sec-5}
       
    91 
       
    92 \begin{verbatim}
       
    93 
       
    94 listinlist[1]
       
    95 listinlist[-5]
       
    96 \end{verbatim}
       
    97 \end{frame}
       
    98 \begin{frame}
       
    99 \frametitle{Questions}
       
   100 \label{sec-6}
       
   101 
       
   102 
       
   103 \begin{itemize}
       
   104 \item Remove the third element from the list, listinlist.
       
   105 \item Remove `and' from the list, listinlist.
       
   106 \end{itemize}
       
   107 \end{frame}
       
   108 \begin{frame}[fragile]
       
   109 \frametitle{Solutions}
       
   110 \label{sec-7}
       
   111 
       
   112 \begin{verbatim}
       
   113 
       
   114 del(listinlist[2])
       
   115 listinlist.remove('and')
       
   116 \end{verbatim}
       
   117 \end{frame}
       
   118 \begin{frame}[fragile]
       
   119 \frametitle{Summary}
       
   120 \label{sec-8}
       
   121 
       
   122 \begin{verbatim}
       
   123 
       
   124 l=[1,2,3,4]
       
   125 l[-1]
       
   126 l.append(5)
       
   127 del(l[2])
       
   128 l.remove(2)
       
   129 len(l)
       
   130 \end{verbatim}
       
   131 \end{frame}
       
   132 \begin{frame}
       
   133 \frametitle{Thank you!}
       
   134 \label{sec-9}
       
   135 
       
   136   \begin{block}{}
       
   137   \begin{center}
       
   138   This spoken tutorial has been produced by the
       
   139   \textcolor{blue}{FOSSEE} team, which is funded by the 
       
   140   \end{center}
       
   141   \begin{center}
       
   142     \textcolor{blue}{National Mission on Education through \\
       
   143       Information \& Communication Technology \\ 
       
   144       MHRD, Govt. of India}.
       
   145   \end{center}  
       
   146   \end{block}
    62 \end{frame}
   147 \end{frame}
    63 
   148 
    64 \end{document}
   149 \end{document}