author | Puneeth Chaganti <punchagan@fossee.in> |
Wed, 10 Nov 2010 10:47:21 +0530 | |
changeset 436 | e62bc810999c |
parent 313 | b9b7bfce773e |
permissions | -rw-r--r-- |
436
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
1 |
% Created 2010-11-10 Wed 10:46 |
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
2 |
\documentclass[presentation]{beamer} |
313
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
3 |
\usepackage[latin1]{inputenc} |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
4 |
\usepackage[T1]{fontenc} |
436
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
5 |
\usepackage{fixltx2e} |
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
6 |
\usepackage{graphicx} |
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
7 |
\usepackage{longtable} |
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
8 |
\usepackage{float} |
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
9 |
\usepackage{wrapfig} |
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
10 |
\usepackage{soul} |
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
11 |
\usepackage{textcomp} |
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
12 |
\usepackage{marvosym} |
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
13 |
\usepackage{wasysym} |
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
14 |
\usepackage{latexsym} |
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
15 |
\usepackage{amssymb} |
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
16 |
\usepackage{hyperref} |
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
17 |
\tolerance=1000 |
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
18 |
\usepackage[english]{babel} \usepackage{ae,aecompl} |
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
19 |
\usepackage{mathpazo,courier,euler} \usepackage[scaled=.95]{helvet} |
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
20 |
\usepackage{listings} |
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
21 |
\lstset{language=Python, basicstyle=\ttfamily\bfseries, |
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
22 |
commentstyle=\color{red}\itshape, stringstyle=\color{darkgreen}, |
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
23 |
showstringspaces=false, keywordstyle=\color{blue}\bfseries} |
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
24 |
\providecommand{\alert}[1]{\textbf{#1}} |
313
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
25 |
|
436
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
26 |
\title{} |
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
27 |
\author{FOSSEE} |
313
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
28 |
\date{} |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
29 |
|
436
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
30 |
\usetheme{Warsaw}\usecolortheme{default}\useoutertheme{infolines}\setbeamercovered{transparent} |
313
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
31 |
\begin{document} |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
32 |
|
436
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
33 |
|
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
34 |
|
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
35 |
|
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
36 |
|
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
37 |
|
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
38 |
|
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
39 |
|
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
40 |
|
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
41 |
|
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
42 |
|
313
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
43 |
\begin{frame} |
436
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
44 |
\frametitle{Outline} |
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
45 |
\label{sec-1} |
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
46 |
\begin{itemize} |
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
47 |
|
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
48 |
\item Defining strings\\ |
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
49 |
\label{sec-1_1}% |
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
50 |
\item Concatenation\\ |
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
51 |
\label{sec-1_2}% |
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
52 |
\item Accessing individual elements\\ |
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
53 |
\label{sec-1_3}% |
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
54 |
\item Immutability of strings\\ |
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
55 |
\label{sec-1_4}% |
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
56 |
\end{itemize} % ends low level |
313
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
57 |
\end{frame} |
436
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
58 |
\begin{frame} |
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
59 |
\frametitle{Question 1} |
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
60 |
\label{sec-2} |
313
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
61 |
|
436
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
62 |
Obtain the string \texttt{\%\% -------------------- \%\%} (20 hyphens) without |
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
63 |
typing out all the twenty hyphens. |
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
64 |
\end{frame} |
313
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
65 |
\begin{frame}[fragile] |
436
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
66 |
\frametitle{Solution 1} |
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
67 |
\label{sec-3} |
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
68 |
|
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
69 |
\lstset{language=Python} |
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
70 |
\begin{lstlisting} |
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
71 |
s = "%% " + "-"*20 + " %%" |
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
72 |
\end{lstlisting} |
313
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
73 |
\end{frame} |
436
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
74 |
\begin{frame}[fragile] |
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
75 |
\frametitle{Question 2} |
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
76 |
\label{sec-4} |
313
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
77 |
|
436
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
78 |
Given a string, \texttt{s} which is \texttt{Hello World} , what is the output of:: |
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
79 |
\lstset{language=Python} |
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
80 |
\begin{lstlisting} |
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
81 |
s[-5] |
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
82 |
s[-10] |
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
83 |
s[-15] |
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
84 |
\end{lstlisting} |
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
85 |
\end{frame} |
313
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
86 |
\begin{frame}[fragile] |
436
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
87 |
\frametitle{Solution 2} |
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
88 |
\label{sec-5} |
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
89 |
|
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
90 |
\lstset{language=Python} |
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
91 |
\begin{lstlisting} |
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
92 |
'W' |
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
93 |
'e' |
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
94 |
IndexError |
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
95 |
\end{lstlisting} |
313
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
96 |
\end{frame} |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
97 |
\begin{frame} |
436
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
98 |
\frametitle{Summary} |
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
99 |
\label{sec-6} |
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
100 |
|
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
101 |
In this tutorial we have learnt |
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
102 |
\begin{itemize} |
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
103 |
\item How to define strings |
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
104 |
\item Different ways of defining a string |
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
105 |
\item String concatenation and repetition |
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
106 |
\item Accessing individual elements of the string |
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
107 |
\item Immutability of strings |
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
108 |
\end{itemize} |
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
109 |
|
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
110 |
|
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
111 |
\end{frame} |
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
112 |
\begin{frame} |
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
113 |
\frametitle{Thank you!} |
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
114 |
\label{sec-7} |
e62bc810999c
Cleaned up getting started with strings LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
313
diff
changeset
|
115 |
|
313
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
116 |
\begin{block}{} |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
117 |
\begin{center} |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
118 |
This spoken tutorial has been produced by the |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
119 |
\textcolor{blue}{FOSSEE} team, which is funded by the |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
120 |
\end{center} |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
121 |
\begin{center} |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
122 |
\textcolor{blue}{National Mission on Education through \\ |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
123 |
Information \& Communication Technology \\ |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
124 |
MHRD, Govt. of India}. |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
125 |
\end{center} |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
126 |
\end{block} |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
127 |
\end{frame} |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
128 |
|
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
129 |
\end{document} |