summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--additional_ipython/quickref.tex11
-rw-r--r--additional_ipython/script.rst (renamed from additional_ipython.rst)142
-rw-r--r--additional_ipython/slides.tex106
-rw-r--r--embellishing_a_plot/quickref.tex11
-rw-r--r--embellishing_a_plot/script.rst (renamed from embellishing_a_plot.rst)111
-rw-r--r--embellishing_a_plot/slides.tex106
-rw-r--r--input_output/quickref.tex11
-rw-r--r--input_output/script.rst (renamed from input_output.rst)131
-rw-r--r--input_output/slides.tex106
-rw-r--r--lstsq/quickref.tex11
-rw-r--r--lstsq/script.rst (renamed from lstsq.rst)40
-rw-r--r--lstsq/slides.tex106
-rw-r--r--parsing_data/quickref.tex11
-rw-r--r--parsing_data/script.rst (renamed from parsing_data.rst)102
-rw-r--r--parsing_data/slides.tex106
-rw-r--r--sets/quickref.tex11
-rw-r--r--sets/script.rst (renamed from sets.rst)117
-rw-r--r--sets/slides.tex106
-rw-r--r--tuples/quickref.tex11
-rw-r--r--tuples/script.rst (renamed from tuples.rst)82
-rw-r--r--tuples/slides.tex106
21 files changed, 958 insertions, 586 deletions
diff --git a/additional_ipython/quickref.tex b/additional_ipython/quickref.tex
new file mode 100644
index 0000000..a0212b3
--- /dev/null
+++ b/additional_ipython/quickref.tex
@@ -0,0 +1,11 @@
+Creating a tuple:\\
+{\ex \lstinline| t = (1, "hello", 2.5)|}
+
+Accessing elements of tuples:\\
+{\ex \lstinline| t[index] Ex: t[2]|}
+
+Accessing slices of tuples:\\
+{\ex \lstinline| t[start:stop:step]|}
+
+Swapping values:\\
+{\ex \lstinline| a, b = b, a|}
diff --git a/additional_ipython.rst b/additional_ipython/script.rst
index d60d630..1a00973 100644
--- a/additional_ipython.rst
+++ b/additional_ipython/script.rst
@@ -1,13 +1,23 @@
-.. Author : Nishanth
- Internal Reviewer 1 :
- Internal Reviewer 2 :
- External Reviewer :
+.. Objectives
+.. ----------
-.. Prerequisites: Embellinshing plots
+.. A - Students and teachers from Science and engineering backgrounds
+ B -
+ C -
+ D -
-Script
-======
+.. Prerequisites
+.. -------------
+
+.. 1. Embellishing Plots
+
+.. Author : Nishanth Amuluru
+ Internal Reviewer :
+ External Reviewer :
+ Checklist OK? : <put date stamp here, if OK> [2010-10-05]
+Script
+------
Hello friends and welcome to the tutorial on Additional Features of IPython
@@ -202,121 +212,3 @@ This tutorial was created as a part of FOSSEE project, NME ICT, MHRD India
Hope you have enjoyed and found it useful.
Thankyou
-Questions
-=========
-
- 1. How do you retrieve the recent 5 commands
-
- a. ``%hist``
- #. ``%hist -5``
- #. ``%hist 5``
- #. ``%hist 5-10``
-
- Answer: ``%hist 5``
-
- 2. If there were 20 commands typed and ``%hist`` is used. How many commands
- will be displayed.
-
- a. 10
- #. 20
- #. 21
- #. 19
-
- Answer: 21
-
- 3. is ``%hist`` considered as a command
-
- a. True
- #. False
-
- Answer: True
-
- 4. how do you retreive the commands from 20 to 50 (inclusive of 20 and 50)
-
- a. ``%hist 20 50``
- #. ``%hist 19 50``
- #. ``%hist 19 51``
- #. ``%hist 21 50``
-
- Answer: ``%hist 20 50``
-
- 5. What does the ``%hist 2 5 7`` command do
-
- a. lists the second, fifth and seventh commands
- #. lists the commands from 2 to 5 and the seventh command
- #. raises an error
- #. lists the commands 2 to 7
-
- Answer: raises an error
-
- 6. How many commands are displayed when lot of coomands were typed and
- ``%hist`` is used.
-
- a. 20
- #. 10
- #. 50
- #. 40
-
- Answer: 40
-
- 7. How do you save the lines 2 3 4 5 7 9 10 11
-
- a. ``%save filepath 2-5 7 9-11``
- #. ``%save filepath 2-11``
- #. ``%save filepath``
- #. ``%save 2-5 7 9 10 11``
-
- Answer: ``%save filepath 2-5 7 9-11``
-
- 8. You are working in /home/user. Where is the file saved when you do
- ``%save hello.py 1-3``
-
- a. /home/user/hello.py
- #. /hello.py
- #. /home/hello.py
- #. /home/user/ipython/hello.py
-
- Answer: /home/user/hello.py
-
- 9. Which lines are saved by the command ``%save filepath 2-5 7 1`` and in
- which order
-
- a. 2 3 4 5 7 1
- #. 1 2 3 4 5 6 7
- #. 2 5 7 1
- #. 1 2 5 7
-
- 10. What happens when ``%save filepath line_numbers`` is used and a file
- already exists in that path.
-
- a. It is overwritten
- #. The commands are added to the file
- #. It raises an error
- #. A prompt to confirm overwriting is displayed
-
- Answer: A prompt to confirm overwriting is displayed
-
- 11. Read through the documentation of ``%hist`` and find its alternative name
-
- Answer: ``%history``
-
- 12. Are ``%run /home/user/saved.py`` and ``%run /home/user/saved`` the same
-
- a. Yes
- #. No
-
- Answer: Yes
-
- 13. The file hello.py contains only one command ``x = x + 1``. What happens
- when you do ``%run hello.py``
-
- Answer: Raises a nameerror
-
- 14. The file hello.py contains only one command ``x = x + 1``. If value of x
- is 5 and what does ``%run -i hello.py`` do.
-
- a. raises an error
- #. increments value of x by 1
- #. Does nothing
-
- Answer: increments the value of x by 1
diff --git a/additional_ipython/slides.tex b/additional_ipython/slides.tex
new file mode 100644
index 0000000..df1462c
--- /dev/null
+++ b/additional_ipython/slides.tex
@@ -0,0 +1,106 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%Tutorial slides on Python.
+%
+% Author: FOSSEE
+% Copyright (c) 2009, FOSSEE, IIT Bombay
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\documentclass[14pt,compress]{beamer}
+%\documentclass[draft]{beamer}
+%\documentclass[compress,handout]{beamer}
+%\usepackage{pgfpages}
+%\pgfpagesuselayout{2 on 1}[a4paper,border shrink=5mm]
+
+% Modified from: generic-ornate-15min-45min.de.tex
+\mode<presentation>
+{
+ \usetheme{Warsaw}
+ \useoutertheme{infolines}
+ \setbeamercovered{transparent}
+}
+
+\usepackage[english]{babel}
+\usepackage[latin1]{inputenc}
+%\usepackage{times}
+\usepackage[T1]{fontenc}
+
+\usepackage{ae,aecompl}
+\usepackage{mathpazo,courier,euler}
+\usepackage[scaled=.95]{helvet}
+
+\definecolor{darkgreen}{rgb}{0,0.5,0}
+
+\usepackage{listings}
+\lstset{language=Python,
+ basicstyle=\ttfamily\bfseries,
+ commentstyle=\color{red}\itshape,
+ stringstyle=\color{darkgreen},
+ showstringspaces=false,
+ keywordstyle=\color{blue}\bfseries}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Macros
+\setbeamercolor{emphbar}{bg=blue!20, fg=black}
+\newcommand{\emphbar}[1]
+{\begin{beamercolorbox}[rounded=true]{emphbar}
+ {#1}
+ \end{beamercolorbox}
+}
+\newcounter{time}
+\setcounter{time}{0}
+\newcommand{\inctime}[1]{\addtocounter{time}{#1}{\tiny \thetime\ m}}
+
+\newcommand{\typ}[1]{\lstinline{#1}}
+
+\newcommand{\kwrd}[1]{ \texttt{\textbf{\color{blue}{#1}}} }
+
+% Title page
+\title{Your Title Here}
+
+\author[FOSSEE] {FOSSEE}
+
+\institute[IIT Bombay] {Department of Aerospace Engineering\\IIT Bombay}
+\date{}
+
+% DOCUMENT STARTS
+\begin{document}
+
+\begin{frame}
+ \maketitle
+\end{frame}
+
+\begin{frame}[fragile]
+ \frametitle{Outline}
+ \begin{itemize}
+ \item
+ \end{itemize}
+\end{frame}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% All other slides here. %%
+%% The same slides will be used in a classroom setting. %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\begin{frame}[fragile]
+ \frametitle{Summary}
+ \begin{itemize}
+ \item
+ \end{itemize}
+\end{frame}
+
+\begin{frame}
+ \frametitle{Thank you!}
+ \begin{block}{}
+ \begin{center}
+ This spoken tutorial has been produced by the
+ \textcolor{blue}{FOSSEE} team, which is funded by the
+ \end{center}
+ \begin{center}
+ \textcolor{blue}{National Mission on Education through \\
+ Information \& Communication Technology \\
+ MHRD, Govt. of India}.
+ \end{center}
+ \end{block}
+\end{frame}
+
+\end{document}
diff --git a/embellishing_a_plot/quickref.tex b/embellishing_a_plot/quickref.tex
new file mode 100644
index 0000000..a0212b3
--- /dev/null
+++ b/embellishing_a_plot/quickref.tex
@@ -0,0 +1,11 @@
+Creating a tuple:\\
+{\ex \lstinline| t = (1, "hello", 2.5)|}
+
+Accessing elements of tuples:\\
+{\ex \lstinline| t[index] Ex: t[2]|}
+
+Accessing slices of tuples:\\
+{\ex \lstinline| t[start:stop:step]|}
+
+Swapping values:\\
+{\ex \lstinline| a, b = b, a|}
diff --git a/embellishing_a_plot.rst b/embellishing_a_plot/script.rst
index c030828..b37365b 100644
--- a/embellishing_a_plot.rst
+++ b/embellishing_a_plot/script.rst
@@ -1,9 +1,23 @@
-.. Author : Nishanth
- Internal Reviewer 1 : Anoop
- Internal Reviewer 2 : Madhu
+.. Objectives
+.. ----------
+
+.. A - Students and teachers from Science and engineering backgrounds
+ B -
+ C -
+ D -
+
+.. Prerequisites
+.. -------------
+
+.. 1. Using the ``plot`` command interactively
+
+.. Author : Nishanth Amuluru
+ Internal Reviewer :
External Reviewer :
+ Checklist OK? : <put date stamp here, if OK> [2010-10-05]
-.. Prerequisites: using ``plot`` command
+Script
+------
Hello friends and welcome to the tutorial on Embellishing Plots.
@@ -354,93 +368,4 @@ This tutorial was created as a part of FOSSEE project, NME ICT, MHRD India
Hope you have enjoyed and found it useful.
Thankyou
-Questions
-=========
-
- 1. Draw a plot of cosine graph between -2pi to 2pi with line thickness 4
-
- Answer::
-
- x = linspace(-2*pi, 2*pi)
- plot(x, cos(x), linewidth=4)
-
- 2. Draw a plot of the polynomial x^2-5x+6 in the range 0 to 5 in blue dotted
- line
-
- Answer::
-
- x = linspace(-2*pi, 2*pi)
- plot(x, x**2 - 5*x + 6, 'r.')
-
- 3. Which marker is used to get circles
-
- a. '.'
- #. '^'
- #. 'o'
- #. '--'
-
- 4. What does the '^' marker produce
-
- Answer: Triangle up marker
-
- 5. How do you set the title as x^2-5x+6 in LaTex style formatting
-
- Answer: title("$x^2-5x+6$")
-
-6. What happens when the following code is executed::
-
- xlabel("First label")
- xlabel("Second label")
-
- Answer: The label of x-axis is set to "Second label"
-
- 7. Read thorugh the documentation and find out is there a way to modify the
- alignment of text in the command ``ylabel``
-
- a. Yes
- #. No
-
- Answer: No
-
- 8. How to add the annotation "Maxima" at the point (1, 2)
-
- Answer: annotate("Maxima", xy=(1, 2))
-
- 9. Is the command ``annotate("max", (1, 2))`` same as ``annotate("max",
- xy=(1, 2)``
-
- a. True
- b. False
-
- Answer: True
-
- 10. When a new annotation is made at a point, what happens to the old one
-
- a. It is replaced
- b. It is overwritten
- c. The new annotation is combined with old one
-
- Answer: It is overwritten
-
- 11. What happens when xlim is used without arguments
-
- Answer: It gives the current limits of x-axis
-
- 12. What happens when ``ylim(0, 5)`` is used
-
- Answer: It sets the lower and upper limits of y-axis to 0 and 5
-
- 13. Draw a cosine plot from 0 to 2*pi with green dots. annotate the origin as
- "origin" and set x and y labels to "x" and cos(x) and x limits to 0 and
- 2pi and y limits to -1.2 and 1.2
-
- Answer::
-
- x = linspace(0, 2*pi)
- plot(x, cos(x), 'g.')
- annotate("origin", (0, 0))
- xlabel("$x$")
- ylabel("$cos(x)$")
- xlim(0, 2*pi)
- ylim(-1.2, 1.2)
diff --git a/embellishing_a_plot/slides.tex b/embellishing_a_plot/slides.tex
new file mode 100644
index 0000000..df1462c
--- /dev/null
+++ b/embellishing_a_plot/slides.tex
@@ -0,0 +1,106 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%Tutorial slides on Python.
+%
+% Author: FOSSEE
+% Copyright (c) 2009, FOSSEE, IIT Bombay
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\documentclass[14pt,compress]{beamer}
+%\documentclass[draft]{beamer}
+%\documentclass[compress,handout]{beamer}
+%\usepackage{pgfpages}
+%\pgfpagesuselayout{2 on 1}[a4paper,border shrink=5mm]
+
+% Modified from: generic-ornate-15min-45min.de.tex
+\mode<presentation>
+{
+ \usetheme{Warsaw}
+ \useoutertheme{infolines}
+ \setbeamercovered{transparent}
+}
+
+\usepackage[english]{babel}
+\usepackage[latin1]{inputenc}
+%\usepackage{times}
+\usepackage[T1]{fontenc}
+
+\usepackage{ae,aecompl}
+\usepackage{mathpazo,courier,euler}
+\usepackage[scaled=.95]{helvet}
+
+\definecolor{darkgreen}{rgb}{0,0.5,0}
+
+\usepackage{listings}
+\lstset{language=Python,
+ basicstyle=\ttfamily\bfseries,
+ commentstyle=\color{red}\itshape,
+ stringstyle=\color{darkgreen},
+ showstringspaces=false,
+ keywordstyle=\color{blue}\bfseries}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Macros
+\setbeamercolor{emphbar}{bg=blue!20, fg=black}
+\newcommand{\emphbar}[1]
+{\begin{beamercolorbox}[rounded=true]{emphbar}
+ {#1}
+ \end{beamercolorbox}
+}
+\newcounter{time}
+\setcounter{time}{0}
+\newcommand{\inctime}[1]{\addtocounter{time}{#1}{\tiny \thetime\ m}}
+
+\newcommand{\typ}[1]{\lstinline{#1}}
+
+\newcommand{\kwrd}[1]{ \texttt{\textbf{\color{blue}{#1}}} }
+
+% Title page
+\title{Your Title Here}
+
+\author[FOSSEE] {FOSSEE}
+
+\institute[IIT Bombay] {Department of Aerospace Engineering\\IIT Bombay}
+\date{}
+
+% DOCUMENT STARTS
+\begin{document}
+
+\begin{frame}
+ \maketitle
+\end{frame}
+
+\begin{frame}[fragile]
+ \frametitle{Outline}
+ \begin{itemize}
+ \item
+ \end{itemize}
+\end{frame}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% All other slides here. %%
+%% The same slides will be used in a classroom setting. %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\begin{frame}[fragile]
+ \frametitle{Summary}
+ \begin{itemize}
+ \item
+ \end{itemize}
+\end{frame}
+
+\begin{frame}
+ \frametitle{Thank you!}
+ \begin{block}{}
+ \begin{center}
+ This spoken tutorial has been produced by the
+ \textcolor{blue}{FOSSEE} team, which is funded by the
+ \end{center}
+ \begin{center}
+ \textcolor{blue}{National Mission on Education through \\
+ Information \& Communication Technology \\
+ MHRD, Govt. of India}.
+ \end{center}
+ \end{block}
+\end{frame}
+
+\end{document}
diff --git a/input_output/quickref.tex b/input_output/quickref.tex
new file mode 100644
index 0000000..a0212b3
--- /dev/null
+++ b/input_output/quickref.tex
@@ -0,0 +1,11 @@
+Creating a tuple:\\
+{\ex \lstinline| t = (1, "hello", 2.5)|}
+
+Accessing elements of tuples:\\
+{\ex \lstinline| t[index] Ex: t[2]|}
+
+Accessing slices of tuples:\\
+{\ex \lstinline| t[start:stop:step]|}
+
+Swapping values:\\
+{\ex \lstinline| a, b = b, a|}
diff --git a/input_output.rst b/input_output/script.rst
index 4af7aa0..46eaa7d 100644
--- a/input_output.rst
+++ b/input_output/script.rst
@@ -1,3 +1,24 @@
+.. Objectives
+.. ----------
+
+.. A - Students and teachers from Science and engineering backgrounds
+ B -
+ C -
+ D -
+
+.. Prerequisites
+.. -------------
+
+.. 1. Loops
+
+.. Author : Nishanth Amuluru
+ Internal Reviewer :
+ External Reviewer :
+ Checklist OK? : <put date stamp here, if OK> [2010-10-05]
+
+Script
+------
+
Hello friends and welcome to the tutorial on Input/Output
{{{ Show the slide containing title }}}
@@ -176,113 +197,3 @@ This tutorial was created as a part of FOSSEE project, NME ICT, MHRD India
Hope you have enjoyed and found it useful.
Thankyou
-.. Author : Nishanth
- Internal Reviewer 1 :
- Internal Reviewer 2 :
- External Reviewer :
-
-Questions
-=========
-
- 1. ``a = 2.5``. What is the output of ``print "a is %d"%(a)``
-
- a. a is 2.5
- #. a is 2.0
- #. 2.0
- #. a is 2
-
- Answer: a is 2
-
- 2. What does ``print "This is", "a line ", "with spaces"`` print?
-
- a. This is a line with spaces
- #. This is a line with spaces
- #. This is a line with spaces
- #. This is a line with spaces
-
- Answer: This is a line with spaces
-
- 3. What does ``print "%2.5f"%(1.2)`` print?
-
- a. 1.2
- #. 1.20
- #. 1.20000
- #. 00001.2
-
- Answer: 1.20000
-
- 4. What is the output of the following code::
-
- for i in range(1,10,2):
- print i,
-
- Answer::
-
- 1 3 5 7 9
-
- 5. ``a = 2`` and ``b = 4.5``. What does ``print "a is %d and b is %2.1f"%(b, a)``
- print?
-
- a. a is 2 and b is 4.5
- #. a is 4 and b is 2
- #. a is 4 and b is 2.0
- #. a is 4.5 and b is 2
-
- Answer: a is 4 and b is 2.0
-
- 6. What is the prompt displayed by ``raw_input("Say something\nType here:")``
-
- Answer::
-
- Say something
- Type here:
-
- 6. What is the prompt displayed by ``raw_input("value of a is %d\nInput b
- value:"a)`` and ``a = 2.5``
-
- Answer::
-
- value of a is 2
- Input ba value:
-
- 7. ``a = raw_input()`` and user enters ``2.5``. What is the type of a?
-
- a. str
- #. int
- #. float
- #. char
-
- Answer: str
-
- 8. ``a = int(raw_input())`` and user enters ``4.5``. What happens?
-
- a. a = 4.5
- #. a = 4
- #. a = 4.0
- #. Error
-
- Answer: Error
-
- 9. ``a = raw_input()`` and user enters ``"this is a string"``. What does
- ``print a`` produce?
-
- a. 'this is a string'
- b. 'this is a string"
- c. "this is a string"
- #. this is a string
-
- Answer: "this is a string"
-
-Problems
-========
-
- 1. Answer to universe and everything. Keep taking input from user and print it
- back until the input is 42.
-
- Answer::
-
- ip = raw_input()
- while ip != "42":
- print ip
-
- 2.
diff --git a/input_output/slides.tex b/input_output/slides.tex
new file mode 100644
index 0000000..df1462c
--- /dev/null
+++ b/input_output/slides.tex
@@ -0,0 +1,106 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%Tutorial slides on Python.
+%
+% Author: FOSSEE
+% Copyright (c) 2009, FOSSEE, IIT Bombay
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\documentclass[14pt,compress]{beamer}
+%\documentclass[draft]{beamer}
+%\documentclass[compress,handout]{beamer}
+%\usepackage{pgfpages}
+%\pgfpagesuselayout{2 on 1}[a4paper,border shrink=5mm]
+
+% Modified from: generic-ornate-15min-45min.de.tex
+\mode<presentation>
+{
+ \usetheme{Warsaw}
+ \useoutertheme{infolines}
+ \setbeamercovered{transparent}
+}
+
+\usepackage[english]{babel}
+\usepackage[latin1]{inputenc}
+%\usepackage{times}
+\usepackage[T1]{fontenc}
+
+\usepackage{ae,aecompl}
+\usepackage{mathpazo,courier,euler}
+\usepackage[scaled=.95]{helvet}
+
+\definecolor{darkgreen}{rgb}{0,0.5,0}
+
+\usepackage{listings}
+\lstset{language=Python,
+ basicstyle=\ttfamily\bfseries,
+ commentstyle=\color{red}\itshape,
+ stringstyle=\color{darkgreen},
+ showstringspaces=false,
+ keywordstyle=\color{blue}\bfseries}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Macros
+\setbeamercolor{emphbar}{bg=blue!20, fg=black}
+\newcommand{\emphbar}[1]
+{\begin{beamercolorbox}[rounded=true]{emphbar}
+ {#1}
+ \end{beamercolorbox}
+}
+\newcounter{time}
+\setcounter{time}{0}
+\newcommand{\inctime}[1]{\addtocounter{time}{#1}{\tiny \thetime\ m}}
+
+\newcommand{\typ}[1]{\lstinline{#1}}
+
+\newcommand{\kwrd}[1]{ \texttt{\textbf{\color{blue}{#1}}} }
+
+% Title page
+\title{Your Title Here}
+
+\author[FOSSEE] {FOSSEE}
+
+\institute[IIT Bombay] {Department of Aerospace Engineering\\IIT Bombay}
+\date{}
+
+% DOCUMENT STARTS
+\begin{document}
+
+\begin{frame}
+ \maketitle
+\end{frame}
+
+\begin{frame}[fragile]
+ \frametitle{Outline}
+ \begin{itemize}
+ \item
+ \end{itemize}
+\end{frame}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% All other slides here. %%
+%% The same slides will be used in a classroom setting. %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\begin{frame}[fragile]
+ \frametitle{Summary}
+ \begin{itemize}
+ \item
+ \end{itemize}
+\end{frame}
+
+\begin{frame}
+ \frametitle{Thank you!}
+ \begin{block}{}
+ \begin{center}
+ This spoken tutorial has been produced by the
+ \textcolor{blue}{FOSSEE} team, which is funded by the
+ \end{center}
+ \begin{center}
+ \textcolor{blue}{National Mission on Education through \\
+ Information \& Communication Technology \\
+ MHRD, Govt. of India}.
+ \end{center}
+ \end{block}
+\end{frame}
+
+\end{document}
diff --git a/lstsq/quickref.tex b/lstsq/quickref.tex
new file mode 100644
index 0000000..a0212b3
--- /dev/null
+++ b/lstsq/quickref.tex
@@ -0,0 +1,11 @@
+Creating a tuple:\\
+{\ex \lstinline| t = (1, "hello", 2.5)|}
+
+Accessing elements of tuples:\\
+{\ex \lstinline| t[index] Ex: t[2]|}
+
+Accessing slices of tuples:\\
+{\ex \lstinline| t[start:stop:step]|}
+
+Swapping values:\\
+{\ex \lstinline| a, b = b, a|}
diff --git a/lstsq.rst b/lstsq/script.rst
index 7af7701..a6b5575 100644
--- a/lstsq.rst
+++ b/lstsq/script.rst
@@ -1,7 +1,24 @@
-.. Author : Nishanth
- Internal Reviewer 1 : Puneeth
- Internal Reviewer 2 :
+.. Objectives
+.. ----------
+
+.. A - Students and teachers from Science and engineering backgrounds
+ B -
+ C -
+ D -
+
+.. Prerequisites
+.. -------------
+
+.. 1. Basic Plotting
+ 2. Arrays
+
+.. Author : Nishanth Amuluru
+ Internal Reviewer :
External Reviewer :
+ Checklist OK? : <put date stamp here, if OK> [2010-10-05]
+
+Script
+------
Hello friends and welcome to the tutorial on Least Square Fit
@@ -119,21 +136,4 @@ This tutorial was created as a part of FOSSEE project, NME ICT, MHRD India
Hope you have enjoyed and found it useful.
Thank you
-Questions
-=========
-
- 1. What does ones_like([1, 2, 3]) produce
-
- a. array([1, 1, 1])
- #. [1, 1, 1]
- #. [1.0, 1.0, 1.0]
- #. Error
-
- 2. What does ones_like([1.2, 3, 4, 5]) produce
-
- a. [1.2, 3, 4, 5]
- #. array([1.0, 1.0, 1.0, 1.0])
- #. array([1, 1, 1, 1])
- #. array([1.2, 3, 4, 5])
- 3. What is the shape of the
diff --git a/lstsq/slides.tex b/lstsq/slides.tex
new file mode 100644
index 0000000..df1462c
--- /dev/null
+++ b/lstsq/slides.tex
@@ -0,0 +1,106 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%Tutorial slides on Python.
+%
+% Author: FOSSEE
+% Copyright (c) 2009, FOSSEE, IIT Bombay
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\documentclass[14pt,compress]{beamer}
+%\documentclass[draft]{beamer}
+%\documentclass[compress,handout]{beamer}
+%\usepackage{pgfpages}
+%\pgfpagesuselayout{2 on 1}[a4paper,border shrink=5mm]
+
+% Modified from: generic-ornate-15min-45min.de.tex
+\mode<presentation>
+{
+ \usetheme{Warsaw}
+ \useoutertheme{infolines}
+ \setbeamercovered{transparent}
+}
+
+\usepackage[english]{babel}
+\usepackage[latin1]{inputenc}
+%\usepackage{times}
+\usepackage[T1]{fontenc}
+
+\usepackage{ae,aecompl}
+\usepackage{mathpazo,courier,euler}
+\usepackage[scaled=.95]{helvet}
+
+\definecolor{darkgreen}{rgb}{0,0.5,0}
+
+\usepackage{listings}
+\lstset{language=Python,
+ basicstyle=\ttfamily\bfseries,
+ commentstyle=\color{red}\itshape,
+ stringstyle=\color{darkgreen},
+ showstringspaces=false,
+ keywordstyle=\color{blue}\bfseries}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Macros
+\setbeamercolor{emphbar}{bg=blue!20, fg=black}
+\newcommand{\emphbar}[1]
+{\begin{beamercolorbox}[rounded=true]{emphbar}
+ {#1}
+ \end{beamercolorbox}
+}
+\newcounter{time}
+\setcounter{time}{0}
+\newcommand{\inctime}[1]{\addtocounter{time}{#1}{\tiny \thetime\ m}}
+
+\newcommand{\typ}[1]{\lstinline{#1}}
+
+\newcommand{\kwrd}[1]{ \texttt{\textbf{\color{blue}{#1}}} }
+
+% Title page
+\title{Your Title Here}
+
+\author[FOSSEE] {FOSSEE}
+
+\institute[IIT Bombay] {Department of Aerospace Engineering\\IIT Bombay}
+\date{}
+
+% DOCUMENT STARTS
+\begin{document}
+
+\begin{frame}
+ \maketitle
+\end{frame}
+
+\begin{frame}[fragile]
+ \frametitle{Outline}
+ \begin{itemize}
+ \item
+ \end{itemize}
+\end{frame}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% All other slides here. %%
+%% The same slides will be used in a classroom setting. %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\begin{frame}[fragile]
+ \frametitle{Summary}
+ \begin{itemize}
+ \item
+ \end{itemize}
+\end{frame}
+
+\begin{frame}
+ \frametitle{Thank you!}
+ \begin{block}{}
+ \begin{center}
+ This spoken tutorial has been produced by the
+ \textcolor{blue}{FOSSEE} team, which is funded by the
+ \end{center}
+ \begin{center}
+ \textcolor{blue}{National Mission on Education through \\
+ Information \& Communication Technology \\
+ MHRD, Govt. of India}.
+ \end{center}
+ \end{block}
+\end{frame}
+
+\end{document}
diff --git a/parsing_data/quickref.tex b/parsing_data/quickref.tex
new file mode 100644
index 0000000..a0212b3
--- /dev/null
+++ b/parsing_data/quickref.tex
@@ -0,0 +1,11 @@
+Creating a tuple:\\
+{\ex \lstinline| t = (1, "hello", 2.5)|}
+
+Accessing elements of tuples:\\
+{\ex \lstinline| t[index] Ex: t[2]|}
+
+Accessing slices of tuples:\\
+{\ex \lstinline| t[start:stop:step]|}
+
+Swapping values:\\
+{\ex \lstinline| a, b = b, a|}
diff --git a/parsing_data.rst b/parsing_data/script.rst
index 17e1d4d..5873132 100644
--- a/parsing_data.rst
+++ b/parsing_data/script.rst
@@ -1,7 +1,23 @@
-.. Author : Nishanth
- Internal Reviewer 1 :
- Internal Reviewer 2 :
+.. Objectives
+.. ----------
+
+.. A - Students and teachers from Science and engineering backgrounds
+ B -
+ C -
+ D -
+
+.. Prerequisites
+.. -------------
+
+.. 1. Getting started with lists
+
+.. Author : Nishanth Amuluru
+ Internal Reviewer :
External Reviewer :
+ Checklist OK? : <put date stamp here, if OK> [2010-10-05]
+
+Script
+------
Hello friends and welcome to the tutorial on Parsing Data
@@ -204,84 +220,4 @@ This tutorial was created as a part of FOSSEE project, NME ICT, MHRD India
Hope you have enjoyed and found it useful.
Thank you
-Questions
-=========
-
- 1. How do you split the string "Guido;Rossum;Python" to get the words
-
- Answer: line.split(';')
-
- 2. line.split() and line.split(' ') are same
-
- a. True
- #. False
-
- Answer: False
-
- 3. What is the output of the following code::
-
- line = "Hello;;;World;;"
- sub_strs = line.split()
- print len(sub_strs)
-
- Answer: 5
-
- 4. What is the output of " Hello World ".strip()
-
- a. "Hello World"
- #. "Hello World"
- #. " Hello World"
- #. "Hello World "
-
- Answer: "Hello World"
-
- 5. What does "It is a cold night".strip("It") produce
- Hint: Read the documentation of strip
-
- a. "is a cold night"
- #. " is a cold nigh"
- #. "It is a cold nigh"
- #. "is a cold nigh"
-
- Answer: " is a cold nigh"
-
- 6. What does int("20") produce
-
- a. "20"
- #. 20.0
- #. 20
- #. Error
-
- Answer: 20
-
- 7. What does int("20.0") produce
-
- a. 20
- #. 20.0
- #. Error
- #. "20"
-
- Answer: Error
-
- 8. What is the value of float(3/2)
-
- a. 1.0
- #. 1.5
- #. 1
- #. Error
-
- Answer: 1.0
-
- 9. what doess float("3/2") produce
-
- a. 1.0
- #. 1.5
- #. 1
- #. Error
-
- Answer: Error
-
- 10. See if there is a function available in pylab to calculate the mean
- Hint: Use tab completion
-
diff --git a/parsing_data/slides.tex b/parsing_data/slides.tex
new file mode 100644
index 0000000..df1462c
--- /dev/null
+++ b/parsing_data/slides.tex
@@ -0,0 +1,106 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%Tutorial slides on Python.
+%
+% Author: FOSSEE
+% Copyright (c) 2009, FOSSEE, IIT Bombay
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\documentclass[14pt,compress]{beamer}
+%\documentclass[draft]{beamer}
+%\documentclass[compress,handout]{beamer}
+%\usepackage{pgfpages}
+%\pgfpagesuselayout{2 on 1}[a4paper,border shrink=5mm]
+
+% Modified from: generic-ornate-15min-45min.de.tex
+\mode<presentation>
+{
+ \usetheme{Warsaw}
+ \useoutertheme{infolines}
+ \setbeamercovered{transparent}
+}
+
+\usepackage[english]{babel}
+\usepackage[latin1]{inputenc}
+%\usepackage{times}
+\usepackage[T1]{fontenc}
+
+\usepackage{ae,aecompl}
+\usepackage{mathpazo,courier,euler}
+\usepackage[scaled=.95]{helvet}
+
+\definecolor{darkgreen}{rgb}{0,0.5,0}
+
+\usepackage{listings}
+\lstset{language=Python,
+ basicstyle=\ttfamily\bfseries,
+ commentstyle=\color{red}\itshape,
+ stringstyle=\color{darkgreen},
+ showstringspaces=false,
+ keywordstyle=\color{blue}\bfseries}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Macros
+\setbeamercolor{emphbar}{bg=blue!20, fg=black}
+\newcommand{\emphbar}[1]
+{\begin{beamercolorbox}[rounded=true]{emphbar}
+ {#1}
+ \end{beamercolorbox}
+}
+\newcounter{time}
+\setcounter{time}{0}
+\newcommand{\inctime}[1]{\addtocounter{time}{#1}{\tiny \thetime\ m}}
+
+\newcommand{\typ}[1]{\lstinline{#1}}
+
+\newcommand{\kwrd}[1]{ \texttt{\textbf{\color{blue}{#1}}} }
+
+% Title page
+\title{Your Title Here}
+
+\author[FOSSEE] {FOSSEE}
+
+\institute[IIT Bombay] {Department of Aerospace Engineering\\IIT Bombay}
+\date{}
+
+% DOCUMENT STARTS
+\begin{document}
+
+\begin{frame}
+ \maketitle
+\end{frame}
+
+\begin{frame}[fragile]
+ \frametitle{Outline}
+ \begin{itemize}
+ \item
+ \end{itemize}
+\end{frame}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% All other slides here. %%
+%% The same slides will be used in a classroom setting. %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\begin{frame}[fragile]
+ \frametitle{Summary}
+ \begin{itemize}
+ \item
+ \end{itemize}
+\end{frame}
+
+\begin{frame}
+ \frametitle{Thank you!}
+ \begin{block}{}
+ \begin{center}
+ This spoken tutorial has been produced by the
+ \textcolor{blue}{FOSSEE} team, which is funded by the
+ \end{center}
+ \begin{center}
+ \textcolor{blue}{National Mission on Education through \\
+ Information \& Communication Technology \\
+ MHRD, Govt. of India}.
+ \end{center}
+ \end{block}
+\end{frame}
+
+\end{document}
diff --git a/sets/quickref.tex b/sets/quickref.tex
new file mode 100644
index 0000000..a0212b3
--- /dev/null
+++ b/sets/quickref.tex
@@ -0,0 +1,11 @@
+Creating a tuple:\\
+{\ex \lstinline| t = (1, "hello", 2.5)|}
+
+Accessing elements of tuples:\\
+{\ex \lstinline| t[index] Ex: t[2]|}
+
+Accessing slices of tuples:\\
+{\ex \lstinline| t[start:stop:step]|}
+
+Swapping values:\\
+{\ex \lstinline| a, b = b, a|}
diff --git a/sets.rst b/sets/script.rst
index 4f7dfa1..944097f 100644
--- a/sets.rst
+++ b/sets/script.rst
@@ -1,3 +1,25 @@
+.. Objectives
+.. ----------
+
+.. A - Students and teachers from Science and engineering backgrounds
+ B - Will learn what are tuples and why they are needed
+ Will learn the various methods of accessing elements in tuples
+ C -
+ D -
+
+.. Prerequisites
+.. -------------
+
+.. 1. Getting started with lists
+
+.. Author : Nishanth Amuluru
+ Internal Reviewer :
+ External Reviewer :
+ Checklist OK? : <put date stamp here, if OK> [2010-10-05]
+
+Script
+------
+
Hello friends and welcome to the tutorial on Sets
{{{ Show the slide containing title }}}
@@ -142,99 +164,4 @@ This tutorial was created as a part of FOSSEE project, NME ICT, MHRD India
Hope you have enjoyed and found it useful.
Thankyou
-
-.. Author : Nishanth
- Internal Reviewer 1 :
- Internal Reviewer 2 :
- External Reviewer :
-
-
-Questions
-=========
-
- 1. If ``a = [1, 1, 2, 3, 3, 5, 5, 8]``. What is set(a)
-
- a. set([1, 1, 2, 3, 3, 5, 5, 8])
- #. set([1, 2, 3, 5, 8])
- #. set([1, 2, 3, 3, 5, 5])
- #. Error
-
- Answer: set([1, 2, 3, 5, 8])
-
- 2. ``a = set([1, 3, 5])``. How do you find the length of a?
-
- Answer: len(a)
-
- 3. ``a = set([1, 3, 5])``. What does a[2] produce?
-
- a. 1
- #. 3
- #. 5
- #. Error
-
- Answer: Error
-
- 4. ``odd = set([1, 3, 5, 7, 9])`` and ``squares = set([1, 4, 9, 16])``. What
- is the value of ``odd | squares``?
-
- Answer: set([1, 3, 4, 5, 7, 9, 16])
-
- 5. ``odd = set([1, 3, 5, 7, 9])`` and ``squares = set([1, 4, 9, 16])``. What
- is the value of ``odd - squares``?
-
- Answer: set([3, 5, 7])
-
- 6. ``odd = set([1, 3, 5, 7, 9])`` and ``squares = set([1, 4, 9, 16])``. What
- is the value of ``odd ^ squares``?
-
- Answer: set([3, 4, 5, 7, 16])
-
- 7. ``odd = set([1, 3, 5, 7, 9])`` and ``squares = set([1, 4, 9, 16])``. What
- does ``odd * squares`` give?
-
- a. set([1, 12, 45, 112, 9])
- #. set([1, 3, 4, 5, 7, 9, 16])
- #. set([])
- #. Error
-
- Answer: Error
-
- 8. ``a = set([1, 2, 3, 4])`` and ``b = set([5, 6, 7, 8])``. What is ``a + b``
-
- a. set([1, 2, 3, 4, 5, 6, 7, 8])
- #. set([6, 8, 10, 12])
- #. set([5, 12, 21, 32])
- #. Error
-
- 9. ``a`` is a set. how do you check if if a varaible ``b`` exists in ``a``?
-
- Answer: b in a
-
- 10. ``a`` and ``b`` are two sets. What is ``a ^ b == (a - b) | (b - a)``?
-
- a. True
- #. False
-
- Answer: False
-
-
-Problems
-========
-
- 1. Given that mat_marks is a list of maths marks of a class. Find out the
- no.of duplicates marks in the list.
-
- Answer::
-
- unique_marks = set(mat_marks)
- no_of_duplicates = len(mat_marks) - len(unique_marks)
-
- 2. Given that mat_marks is a list of maths marks of a class. Find how many
- duplicates of each mark exist.
-
- Answer::
- marks_set = set(mat_marks)
- for mark in marks_set:
- occurences = mat_marks.count(mark)
- print occurences - 1, "duplicates of", mark, "exist"
diff --git a/sets/slides.tex b/sets/slides.tex
new file mode 100644
index 0000000..df1462c
--- /dev/null
+++ b/sets/slides.tex
@@ -0,0 +1,106 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%Tutorial slides on Python.
+%
+% Author: FOSSEE
+% Copyright (c) 2009, FOSSEE, IIT Bombay
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\documentclass[14pt,compress]{beamer}
+%\documentclass[draft]{beamer}
+%\documentclass[compress,handout]{beamer}
+%\usepackage{pgfpages}
+%\pgfpagesuselayout{2 on 1}[a4paper,border shrink=5mm]
+
+% Modified from: generic-ornate-15min-45min.de.tex
+\mode<presentation>
+{
+ \usetheme{Warsaw}
+ \useoutertheme{infolines}
+ \setbeamercovered{transparent}
+}
+
+\usepackage[english]{babel}
+\usepackage[latin1]{inputenc}
+%\usepackage{times}
+\usepackage[T1]{fontenc}
+
+\usepackage{ae,aecompl}
+\usepackage{mathpazo,courier,euler}
+\usepackage[scaled=.95]{helvet}
+
+\definecolor{darkgreen}{rgb}{0,0.5,0}
+
+\usepackage{listings}
+\lstset{language=Python,
+ basicstyle=\ttfamily\bfseries,
+ commentstyle=\color{red}\itshape,
+ stringstyle=\color{darkgreen},
+ showstringspaces=false,
+ keywordstyle=\color{blue}\bfseries}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Macros
+\setbeamercolor{emphbar}{bg=blue!20, fg=black}
+\newcommand{\emphbar}[1]
+{\begin{beamercolorbox}[rounded=true]{emphbar}
+ {#1}
+ \end{beamercolorbox}
+}
+\newcounter{time}
+\setcounter{time}{0}
+\newcommand{\inctime}[1]{\addtocounter{time}{#1}{\tiny \thetime\ m}}
+
+\newcommand{\typ}[1]{\lstinline{#1}}
+
+\newcommand{\kwrd}[1]{ \texttt{\textbf{\color{blue}{#1}}} }
+
+% Title page
+\title{Your Title Here}
+
+\author[FOSSEE] {FOSSEE}
+
+\institute[IIT Bombay] {Department of Aerospace Engineering\\IIT Bombay}
+\date{}
+
+% DOCUMENT STARTS
+\begin{document}
+
+\begin{frame}
+ \maketitle
+\end{frame}
+
+\begin{frame}[fragile]
+ \frametitle{Outline}
+ \begin{itemize}
+ \item
+ \end{itemize}
+\end{frame}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% All other slides here. %%
+%% The same slides will be used in a classroom setting. %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\begin{frame}[fragile]
+ \frametitle{Summary}
+ \begin{itemize}
+ \item
+ \end{itemize}
+\end{frame}
+
+\begin{frame}
+ \frametitle{Thank you!}
+ \begin{block}{}
+ \begin{center}
+ This spoken tutorial has been produced by the
+ \textcolor{blue}{FOSSEE} team, which is funded by the
+ \end{center}
+ \begin{center}
+ \textcolor{blue}{National Mission on Education through \\
+ Information \& Communication Technology \\
+ MHRD, Govt. of India}.
+ \end{center}
+ \end{block}
+\end{frame}
+
+\end{document}
diff --git a/tuples/quickref.tex b/tuples/quickref.tex
new file mode 100644
index 0000000..a0212b3
--- /dev/null
+++ b/tuples/quickref.tex
@@ -0,0 +1,11 @@
+Creating a tuple:\\
+{\ex \lstinline| t = (1, "hello", 2.5)|}
+
+Accessing elements of tuples:\\
+{\ex \lstinline| t[index] Ex: t[2]|}
+
+Accessing slices of tuples:\\
+{\ex \lstinline| t[start:stop:step]|}
+
+Swapping values:\\
+{\ex \lstinline| a, b = b, a|}
diff --git a/tuples.rst b/tuples/script.rst
index e6c060c..54fee50 100644
--- a/tuples.rst
+++ b/tuples/script.rst
@@ -1,3 +1,25 @@
+.. Objectives
+.. ----------
+
+.. A - Students and teachers from Science and engineering backgrounds
+ B - Will learn what are tuples and why they are needed
+ Will learn the various methods of accessing elements in tuples
+ C -
+ D -
+
+.. Prerequisites
+.. -------------
+
+.. 1. Getting started with lists
+
+.. Author : Nishanth Amuluru
+ Internal Reviewer :
+ External Reviewer :
+ Checklist OK? : <put date stamp here, if OK> [2010-10-05]
+
+Script
+------
+
Hello friends and welcome to the tutorial on Tuples
{{{ Show the slide containing title }}}
@@ -143,64 +165,4 @@ This tutorial was created as a part of FOSSEE project, NME ICT, MHRD India
Hope you have enjoyed and found it useful.
Thankyou
-
-.. Author : Nishanth
- Internal Reviewer 1 :
- Internal Reviewer 2 :
- External Reviewer :
-
-Questions
-=========
-
- 1. Define a tuple containing two values. The first being integer 4 and second
- is a float 2.5
-
- Answer: (4, 2.5)
-
- 2. If ``a = (5, "Hello", 3.2)``. what is the value of a[2]
-
- Answer: 3.2
-
- 3. If ``a = 5,`` then what is the type of a
-
- a. int
- #. float
- #. tuple
- #. string
-
- Answer: tuple
-
- 4. if ``a = (2, 3)``. What does ``a[0], a[1] = (3, 4)`` produce
-
- Answer: Error
-
- 5. If ``a = ([2, 3], 4, 5)``. What is the value of ``a`` after doing
- ``a[0].append(6)``
-
- a. ([2, 3, 6], 4, 5)
- #. Raises an error
- #. ([2, 3], 4, 5)
- #. [2, 3, 4, 5, 6]
-
- Answer: ([2, 3, 6], 4, 5)
-
- 6. What does the following code produce::
-
- a = 5
- b = "Hello"
- a, b = b, a
- print a
- print b
-
- Answer: Hello
- 5
-
- 7. ``a = ("hello", "world", 5, 6, 8)``. What is the value of a[1:4]
-
- Answer: ("world", 5, 6)
-
- 8. ``a = (1, 2, 3, 4, 5, 6, 7, 8)``. What is the value of a[1::3]
-
- Answer: (2, 5, 8)
-
diff --git a/tuples/slides.tex b/tuples/slides.tex
new file mode 100644
index 0000000..df1462c
--- /dev/null
+++ b/tuples/slides.tex
@@ -0,0 +1,106 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%Tutorial slides on Python.
+%
+% Author: FOSSEE
+% Copyright (c) 2009, FOSSEE, IIT Bombay
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\documentclass[14pt,compress]{beamer}
+%\documentclass[draft]{beamer}
+%\documentclass[compress,handout]{beamer}
+%\usepackage{pgfpages}
+%\pgfpagesuselayout{2 on 1}[a4paper,border shrink=5mm]
+
+% Modified from: generic-ornate-15min-45min.de.tex
+\mode<presentation>
+{
+ \usetheme{Warsaw}
+ \useoutertheme{infolines}
+ \setbeamercovered{transparent}
+}
+
+\usepackage[english]{babel}
+\usepackage[latin1]{inputenc}
+%\usepackage{times}
+\usepackage[T1]{fontenc}
+
+\usepackage{ae,aecompl}
+\usepackage{mathpazo,courier,euler}
+\usepackage[scaled=.95]{helvet}
+
+\definecolor{darkgreen}{rgb}{0,0.5,0}
+
+\usepackage{listings}
+\lstset{language=Python,
+ basicstyle=\ttfamily\bfseries,
+ commentstyle=\color{red}\itshape,
+ stringstyle=\color{darkgreen},
+ showstringspaces=false,
+ keywordstyle=\color{blue}\bfseries}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Macros
+\setbeamercolor{emphbar}{bg=blue!20, fg=black}
+\newcommand{\emphbar}[1]
+{\begin{beamercolorbox}[rounded=true]{emphbar}
+ {#1}
+ \end{beamercolorbox}
+}
+\newcounter{time}
+\setcounter{time}{0}
+\newcommand{\inctime}[1]{\addtocounter{time}{#1}{\tiny \thetime\ m}}
+
+\newcommand{\typ}[1]{\lstinline{#1}}
+
+\newcommand{\kwrd}[1]{ \texttt{\textbf{\color{blue}{#1}}} }
+
+% Title page
+\title{Your Title Here}
+
+\author[FOSSEE] {FOSSEE}
+
+\institute[IIT Bombay] {Department of Aerospace Engineering\\IIT Bombay}
+\date{}
+
+% DOCUMENT STARTS
+\begin{document}
+
+\begin{frame}
+ \maketitle
+\end{frame}
+
+\begin{frame}[fragile]
+ \frametitle{Outline}
+ \begin{itemize}
+ \item
+ \end{itemize}
+\end{frame}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% All other slides here. %%
+%% The same slides will be used in a classroom setting. %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\begin{frame}[fragile]
+ \frametitle{Summary}
+ \begin{itemize}
+ \item
+ \end{itemize}
+\end{frame}
+
+\begin{frame}
+ \frametitle{Thank you!}
+ \begin{block}{}
+ \begin{center}
+ This spoken tutorial has been produced by the
+ \textcolor{blue}{FOSSEE} team, which is funded by the
+ \end{center}
+ \begin{center}
+ \textcolor{blue}{National Mission on Education through \\
+ Information \& Communication Technology \\
+ MHRD, Govt. of India}.
+ \end{center}
+ \end{block}
+\end{frame}
+
+\end{document}