author | bhanu |
Mon, 08 Nov 2010 01:34:02 +0530 | |
changeset 454 | 0c69c2b32183 |
parent 282 | 8c35d7977f04 |
permissions | -rw-r--r-- |
282
8c35d7977f04
Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
232
diff
changeset
|
1 |
% Created 2010-10-10 Sun 23:03 |
8c35d7977f04
Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
232
diff
changeset
|
2 |
\documentclass[presentation]{beamer} |
232
da873a5ac918
made the tuples.rst into new template form
Nishanth <nishanth@fossee.in>
parents:
diff
changeset
|
3 |
\usepackage[latin1]{inputenc} |
da873a5ac918
made the tuples.rst into new template form
Nishanth <nishanth@fossee.in>
parents:
diff
changeset
|
4 |
\usepackage[T1]{fontenc} |
282
8c35d7977f04
Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
232
diff
changeset
|
5 |
\usepackage{fixltx2e} |
8c35d7977f04
Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
232
diff
changeset
|
6 |
\usepackage{graphicx} |
8c35d7977f04
Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
232
diff
changeset
|
7 |
\usepackage{longtable} |
8c35d7977f04
Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
232
diff
changeset
|
8 |
\usepackage{float} |
8c35d7977f04
Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
232
diff
changeset
|
9 |
\usepackage{wrapfig} |
8c35d7977f04
Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
232
diff
changeset
|
10 |
\usepackage{soul} |
8c35d7977f04
Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
232
diff
changeset
|
11 |
\usepackage{textcomp} |
8c35d7977f04
Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
232
diff
changeset
|
12 |
\usepackage{marvosym} |
8c35d7977f04
Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
232
diff
changeset
|
13 |
\usepackage{wasysym} |
8c35d7977f04
Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
232
diff
changeset
|
14 |
\usepackage{latexsym} |
8c35d7977f04
Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
232
diff
changeset
|
15 |
\usepackage{amssymb} |
8c35d7977f04
Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
232
diff
changeset
|
16 |
\usepackage{hyperref} |
8c35d7977f04
Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
232
diff
changeset
|
17 |
\tolerance=1000 |
8c35d7977f04
Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
232
diff
changeset
|
18 |
\usepackage[english]{babel} \usepackage{ae,aecompl} |
8c35d7977f04
Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
232
diff
changeset
|
19 |
\usepackage{mathpazo,courier,euler} \usepackage[scaled=.95]{helvet} |
8c35d7977f04
Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
232
diff
changeset
|
20 |
\usepackage{listings} |
8c35d7977f04
Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
232
diff
changeset
|
21 |
\lstset{language=Python, basicstyle=\ttfamily\bfseries, |
8c35d7977f04
Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
232
diff
changeset
|
22 |
commentstyle=\color{red}\itshape, stringstyle=\color{darkgreen}, |
8c35d7977f04
Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
232
diff
changeset
|
23 |
showstringspaces=false, keywordstyle=\color{blue}\bfseries} |
8c35d7977f04
Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
232
diff
changeset
|
24 |
\providecommand{\alert}[1]{\textbf{#1}} |
232
da873a5ac918
made the tuples.rst into new template form
Nishanth <nishanth@fossee.in>
parents:
diff
changeset
|
25 |
|
282
8c35d7977f04
Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
232
diff
changeset
|
26 |
\title{Getting started -- Tuples} |
8c35d7977f04
Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
232
diff
changeset
|
27 |
\author{FOSSEE} |
232
da873a5ac918
made the tuples.rst into new template form
Nishanth <nishanth@fossee.in>
parents:
diff
changeset
|
28 |
\date{} |
da873a5ac918
made the tuples.rst into new template form
Nishanth <nishanth@fossee.in>
parents:
diff
changeset
|
29 |
|
282
8c35d7977f04
Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
232
diff
changeset
|
30 |
\usetheme{Warsaw}\usecolortheme{default}\useoutertheme{infolines}\setbeamercovered{transparent} |
232
da873a5ac918
made the tuples.rst into new template form
Nishanth <nishanth@fossee.in>
parents:
diff
changeset
|
31 |
\begin{document} |
da873a5ac918
made the tuples.rst into new template form
Nishanth <nishanth@fossee.in>
parents:
diff
changeset
|
32 |
|
282
8c35d7977f04
Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
232
diff
changeset
|
33 |
\maketitle |
8c35d7977f04
Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
232
diff
changeset
|
34 |
|
8c35d7977f04
Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
232
diff
changeset
|
35 |
|
8c35d7977f04
Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
232
diff
changeset
|
36 |
|
8c35d7977f04
Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
232
diff
changeset
|
37 |
|
8c35d7977f04
Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
232
diff
changeset
|
38 |
|
8c35d7977f04
Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
232
diff
changeset
|
39 |
|
8c35d7977f04
Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
232
diff
changeset
|
40 |
|
8c35d7977f04
Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
232
diff
changeset
|
41 |
|
8c35d7977f04
Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
232
diff
changeset
|
42 |
|
232
da873a5ac918
made the tuples.rst into new template form
Nishanth <nishanth@fossee.in>
parents:
diff
changeset
|
43 |
\begin{frame} |
282
8c35d7977f04
Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
232
diff
changeset
|
44 |
\frametitle{Outline} |
8c35d7977f04
Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
232
diff
changeset
|
45 |
\label{sec-1} |
8c35d7977f04
Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
232
diff
changeset
|
46 |
|
8c35d7977f04
Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
232
diff
changeset
|
47 |
\begin{itemize} |
8c35d7977f04
Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
232
diff
changeset
|
48 |
\item what are tuples |
8c35d7977f04
Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
232
diff
changeset
|
49 |
\item comparison with lists |
8c35d7977f04
Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
232
diff
changeset
|
50 |
\item why are they needed |
8c35d7977f04
Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
232
diff
changeset
|
51 |
\end{itemize} |
232
da873a5ac918
made the tuples.rst into new template form
Nishanth <nishanth@fossee.in>
parents:
diff
changeset
|
52 |
\end{frame} |
282
8c35d7977f04
Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
232
diff
changeset
|
53 |
\begin{frame} |
8c35d7977f04
Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
232
diff
changeset
|
54 |
\frametitle{Question 1} |
8c35d7977f04
Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
232
diff
changeset
|
55 |
\label{sec-2} |
232
da873a5ac918
made the tuples.rst into new template form
Nishanth <nishanth@fossee.in>
parents:
diff
changeset
|
56 |
|
282
8c35d7977f04
Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
232
diff
changeset
|
57 |
\texttt{a = 5} and \texttt{b = 7}. swap the values of \texttt{a} and \texttt{b} |
8c35d7977f04
Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
232
diff
changeset
|
58 |
\end{frame} |
232
da873a5ac918
made the tuples.rst into new template form
Nishanth <nishanth@fossee.in>
parents:
diff
changeset
|
59 |
\begin{frame}[fragile] |
282
8c35d7977f04
Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
232
diff
changeset
|
60 |
\frametitle{Solution 1} |
8c35d7977f04
Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
232
diff
changeset
|
61 |
\label{sec-3} |
232
da873a5ac918
made the tuples.rst into new template form
Nishanth <nishanth@fossee.in>
parents:
diff
changeset
|
62 |
|
282
8c35d7977f04
Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
232
diff
changeset
|
63 |
\lstset{language=Python} |
8c35d7977f04
Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
232
diff
changeset
|
64 |
\begin{lstlisting} |
8c35d7977f04
Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
232
diff
changeset
|
65 |
temp = a |
8c35d7977f04
Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
232
diff
changeset
|
66 |
a = b |
8c35d7977f04
Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
232
diff
changeset
|
67 |
b = temp |
8c35d7977f04
Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
232
diff
changeset
|
68 |
|
8c35d7977f04
Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
232
diff
changeset
|
69 |
a |
8c35d7977f04
Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
232
diff
changeset
|
70 |
b |
8c35d7977f04
Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
232
diff
changeset
|
71 |
\end{lstlisting} |
8c35d7977f04
Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
232
diff
changeset
|
72 |
\end{frame} |
8c35d7977f04
Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
232
diff
changeset
|
73 |
\begin{frame} |
8c35d7977f04
Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
232
diff
changeset
|
74 |
\frametitle{Summary} |
8c35d7977f04
Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
232
diff
changeset
|
75 |
\label{sec-4} |
232
da873a5ac918
made the tuples.rst into new template form
Nishanth <nishanth@fossee.in>
parents:
diff
changeset
|
76 |
|
282
8c35d7977f04
Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
232
diff
changeset
|
77 |
You should now -- |
8c35d7977f04
Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
232
diff
changeset
|
78 |
\begin{itemize} |
8c35d7977f04
Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
232
diff
changeset
|
79 |
\item Be able to define tuples |
8c35d7977f04
Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
232
diff
changeset
|
80 |
\item Know the similarities with lists, like -- indexing and iterability |
8c35d7977f04
Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
232
diff
changeset
|
81 |
\item Know about the immutability of tuples |
8c35d7977f04
Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
232
diff
changeset
|
82 |
\item Be able to swap variables in the Pythonic way |
8c35d7977f04
Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
232
diff
changeset
|
83 |
\item Know about packing and unpacking of tuples |
8c35d7977f04
Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
232
diff
changeset
|
84 |
\end{itemize} |
232
da873a5ac918
made the tuples.rst into new template form
Nishanth <nishanth@fossee.in>
parents:
diff
changeset
|
85 |
\end{frame} |
282
8c35d7977f04
Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
232
diff
changeset
|
86 |
\begin{frame} |
8c35d7977f04
Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
232
diff
changeset
|
87 |
\frametitle{Thank you!} |
8c35d7977f04
Slides for tuples LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
232
diff
changeset
|
88 |
\label{sec-5} |
232
da873a5ac918
made the tuples.rst into new template form
Nishanth <nishanth@fossee.in>
parents:
diff
changeset
|
89 |
|
da873a5ac918
made the tuples.rst into new template form
Nishanth <nishanth@fossee.in>
parents:
diff
changeset
|
90 |
\begin{block}{} |
da873a5ac918
made the tuples.rst into new template form
Nishanth <nishanth@fossee.in>
parents:
diff
changeset
|
91 |
\begin{center} |
da873a5ac918
made the tuples.rst into new template form
Nishanth <nishanth@fossee.in>
parents:
diff
changeset
|
92 |
This spoken tutorial has been produced by the |
da873a5ac918
made the tuples.rst into new template form
Nishanth <nishanth@fossee.in>
parents:
diff
changeset
|
93 |
\textcolor{blue}{FOSSEE} team, which is funded by the |
da873a5ac918
made the tuples.rst into new template form
Nishanth <nishanth@fossee.in>
parents:
diff
changeset
|
94 |
\end{center} |
da873a5ac918
made the tuples.rst into new template form
Nishanth <nishanth@fossee.in>
parents:
diff
changeset
|
95 |
\begin{center} |
da873a5ac918
made the tuples.rst into new template form
Nishanth <nishanth@fossee.in>
parents:
diff
changeset
|
96 |
\textcolor{blue}{National Mission on Education through \\ |
da873a5ac918
made the tuples.rst into new template form
Nishanth <nishanth@fossee.in>
parents:
diff
changeset
|
97 |
Information \& Communication Technology \\ |
da873a5ac918
made the tuples.rst into new template form
Nishanth <nishanth@fossee.in>
parents:
diff
changeset
|
98 |
MHRD, Govt. of India}. |
da873a5ac918
made the tuples.rst into new template form
Nishanth <nishanth@fossee.in>
parents:
diff
changeset
|
99 |
\end{center} |
da873a5ac918
made the tuples.rst into new template form
Nishanth <nishanth@fossee.in>
parents:
diff
changeset
|
100 |
\end{block} |
da873a5ac918
made the tuples.rst into new template form
Nishanth <nishanth@fossee.in>
parents:
diff
changeset
|
101 |
\end{frame} |
da873a5ac918
made the tuples.rst into new template form
Nishanth <nishanth@fossee.in>
parents:
diff
changeset
|
102 |
|
da873a5ac918
made the tuples.rst into new template form
Nishanth <nishanth@fossee.in>
parents:
diff
changeset
|
103 |
\end{document} |