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