author | Puneeth Chaganti <punchagan@fossee.in> |
Tue, 09 Nov 2010 17:15:24 +0530 | |
changeset 427 | c193744340ba |
parent 281 | d91133654fc8 |
permissions | -rw-r--r-- |
427 | 1 |
% Created 2010-11-09 Tue 17:14 |
281 | 2 |
\documentclass[presentation]{beamer} |
233
ab748264f726
Made sets.rst into the new template form
Nishanth <nishanth@fossee.in>
parents:
diff
changeset
|
3 |
\usepackage[latin1]{inputenc} |
ab748264f726
Made sets.rst into the new template form
Nishanth <nishanth@fossee.in>
parents:
diff
changeset
|
4 |
\usepackage[T1]{fontenc} |
281 | 5 |
\usepackage{fixltx2e} |
6 |
\usepackage{graphicx} |
|
7 |
\usepackage{longtable} |
|
8 |
\usepackage{float} |
|
9 |
\usepackage{wrapfig} |
|
10 |
\usepackage{soul} |
|
11 |
\usepackage{textcomp} |
|
12 |
\usepackage{marvosym} |
|
13 |
\usepackage{wasysym} |
|
14 |
\usepackage{latexsym} |
|
15 |
\usepackage{amssymb} |
|
16 |
\usepackage{hyperref} |
|
17 |
\tolerance=1000 |
|
18 |
\usepackage[english]{babel} \usepackage{ae,aecompl} |
|
19 |
\usepackage{mathpazo,courier,euler} \usepackage[scaled=.95]{helvet} |
|
20 |
\usepackage{listings} |
|
21 |
\lstset{language=Python, basicstyle=\ttfamily\bfseries, |
|
22 |
commentstyle=\color{red}\itshape, stringstyle=\color{darkgreen}, |
|
23 |
showstringspaces=false, keywordstyle=\color{blue}\bfseries} |
|
24 |
\providecommand{\alert}[1]{\textbf{#1}} |
|
233
ab748264f726
Made sets.rst into the new template form
Nishanth <nishanth@fossee.in>
parents:
diff
changeset
|
25 |
|
281 | 26 |
\title{Sets} |
27 |
\author{FOSSEE} |
|
233
ab748264f726
Made sets.rst into the new template form
Nishanth <nishanth@fossee.in>
parents:
diff
changeset
|
28 |
\date{} |
ab748264f726
Made sets.rst into the new template form
Nishanth <nishanth@fossee.in>
parents:
diff
changeset
|
29 |
|
281 | 30 |
\usetheme{Warsaw}\usecolortheme{default}\useoutertheme{infolines}\setbeamercovered{transparent} |
233
ab748264f726
Made sets.rst into the new template form
Nishanth <nishanth@fossee.in>
parents:
diff
changeset
|
31 |
\begin{document} |
ab748264f726
Made sets.rst into the new template form
Nishanth <nishanth@fossee.in>
parents:
diff
changeset
|
32 |
|
281 | 33 |
\maketitle |
34 |
||
35 |
||
36 |
||
37 |
||
38 |
||
39 |
||
40 |
||
41 |
||
42 |
||
233
ab748264f726
Made sets.rst into the new template form
Nishanth <nishanth@fossee.in>
parents:
diff
changeset
|
43 |
\begin{frame} |
281 | 44 |
\frametitle{Outline} |
45 |
\label{sec-1} |
|
46 |
||
47 |
\begin{itemize} |
|
48 |
\item Defining Sets |
|
49 |
\item Operations on sets |
|
50 |
\end{itemize} |
|
233
ab748264f726
Made sets.rst into the new template form
Nishanth <nishanth@fossee.in>
parents:
diff
changeset
|
51 |
\end{frame} |
281 | 52 |
\begin{frame} |
53 |
\frametitle{Question 1} |
|
54 |
\label{sec-2} |
|
233
ab748264f726
Made sets.rst into the new template form
Nishanth <nishanth@fossee.in>
parents:
diff
changeset
|
55 |
|
281 | 56 |
Given a list of marks, \texttt{marks = [20, 23, 22, 23, 20, 21, 23]} list |
57 |
all the duplicates |
|
58 |
\end{frame} |
|
233
ab748264f726
Made sets.rst into the new template form
Nishanth <nishanth@fossee.in>
parents:
diff
changeset
|
59 |
\begin{frame}[fragile] |
281 | 60 |
\frametitle{Solution 1} |
61 |
\label{sec-3} |
|
233
ab748264f726
Made sets.rst into the new template form
Nishanth <nishanth@fossee.in>
parents:
diff
changeset
|
62 |
|
281 | 63 |
\lstset{language=Python} |
64 |
\begin{lstlisting} |
|
65 |
marks = [20, 23, 22, 23, 20, 21, 23] |
|
66 |
marks_set = set(marks) |
|
67 |
for mark in marks_set: |
|
68 |
marks.remove(mark) |
|
233
ab748264f726
Made sets.rst into the new template form
Nishanth <nishanth@fossee.in>
parents:
diff
changeset
|
69 |
|
427 | 70 |
# we are now left with only duplicates |
71 |
# in the list marks |
|
281 | 72 |
duplicates = set(marks) |
73 |
\end{lstlisting} |
|
233
ab748264f726
Made sets.rst into the new template form
Nishanth <nishanth@fossee.in>
parents:
diff
changeset
|
74 |
\end{frame} |
ab748264f726
Made sets.rst into the new template form
Nishanth <nishanth@fossee.in>
parents:
diff
changeset
|
75 |
\begin{frame} |
281 | 76 |
\frametitle{Summary} |
77 |
\label{sec-4} |
|
78 |
||
79 |
You should now be able to -- |
|
80 |
\begin{itemize} |
|
81 |
\item make sets from lists |
|
82 |
\item input sets directly |
|
83 |
\item perform operations like union, intersection, symmetric difference |
|
84 |
\item check if a subset of another |
|
85 |
\item check containership, length and other properties similar to lists |
|
86 |
\end{itemize} |
|
87 |
\end{frame} |
|
88 |
\begin{frame} |
|
89 |
\frametitle{Thank you!} |
|
90 |
\label{sec-5} |
|
91 |
||
233
ab748264f726
Made sets.rst into the new template form
Nishanth <nishanth@fossee.in>
parents:
diff
changeset
|
92 |
\begin{block}{} |
ab748264f726
Made sets.rst into the new template form
Nishanth <nishanth@fossee.in>
parents:
diff
changeset
|
93 |
\begin{center} |
ab748264f726
Made sets.rst into the new template form
Nishanth <nishanth@fossee.in>
parents:
diff
changeset
|
94 |
This spoken tutorial has been produced by the |
ab748264f726
Made sets.rst into the new template form
Nishanth <nishanth@fossee.in>
parents:
diff
changeset
|
95 |
\textcolor{blue}{FOSSEE} team, which is funded by the |
ab748264f726
Made sets.rst into the new template form
Nishanth <nishanth@fossee.in>
parents:
diff
changeset
|
96 |
\end{center} |
ab748264f726
Made sets.rst into the new template form
Nishanth <nishanth@fossee.in>
parents:
diff
changeset
|
97 |
\begin{center} |
ab748264f726
Made sets.rst into the new template form
Nishanth <nishanth@fossee.in>
parents:
diff
changeset
|
98 |
\textcolor{blue}{National Mission on Education through \\ |
ab748264f726
Made sets.rst into the new template form
Nishanth <nishanth@fossee.in>
parents:
diff
changeset
|
99 |
Information \& Communication Technology \\ |
ab748264f726
Made sets.rst into the new template form
Nishanth <nishanth@fossee.in>
parents:
diff
changeset
|
100 |
MHRD, Govt. of India}. |
ab748264f726
Made sets.rst into the new template form
Nishanth <nishanth@fossee.in>
parents:
diff
changeset
|
101 |
\end{center} |
ab748264f726
Made sets.rst into the new template form
Nishanth <nishanth@fossee.in>
parents:
diff
changeset
|
102 |
\end{block} |
ab748264f726
Made sets.rst into the new template form
Nishanth <nishanth@fossee.in>
parents:
diff
changeset
|
103 |
\end{frame} |
ab748264f726
Made sets.rst into the new template form
Nishanth <nishanth@fossee.in>
parents:
diff
changeset
|
104 |
|
ab748264f726
Made sets.rst into the new template form
Nishanth <nishanth@fossee.in>
parents:
diff
changeset
|
105 |
\end{document} |