summaryrefslogtreecommitdiff
path: root/quiz-day2.tex
diff options
context:
space:
mode:
authorMadhusudan.C.S2009-12-29 19:25:11 +0530
committerMadhusudan.C.S2009-12-29 19:25:11 +0530
commitf38b9113f14dfe1421cddfaf938759408bb43eea (patch)
treeb56c4d36777394e8472dc8df0c4cb113f5ab6f6e /quiz-day2.tex
parent4921db12e2b0ba6d59cea1619afd791c9e20033f (diff)
parent20f85fd6a02c29533c92c631aac2ebaba69fd82e (diff)
downloadworkshops-more-scipy-f38b9113f14dfe1421cddfaf938759408bb43eea.tar.gz
workshops-more-scipy-f38b9113f14dfe1421cddfaf938759408bb43eea.tar.bz2
workshops-more-scipy-f38b9113f14dfe1421cddfaf938759408bb43eea.zip
Merged the branches.
Diffstat (limited to 'quiz-day2.tex')
-rw-r--r--quiz-day2.tex178
1 files changed, 0 insertions, 178 deletions
diff --git a/quiz-day2.tex b/quiz-day2.tex
deleted file mode 100644
index 7b65c87..0000000
--- a/quiz-day2.tex
+++ /dev/null
@@ -1,178 +0,0 @@
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Tutorial slides on Python.
-%
-% Author: FOSSEE <info at fossee dot in>
-% Copyright (c) 2005-2009, FOSSEE Team
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-
-\documentclass[14pt,compress]{beamer}
-
-\mode<presentation>
-{
- \useoutertheme{split}
- \setbeamercovered{transparent}
-}
-
-\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}
-
-\newcommand{\kwrd}[1]{ \texttt{\textbf{\color{blue}{#1}}} }
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Macros
-
-\newcounter{qno}
-\setcounter{qno}{0}
-\newcommand{\incqno}{\addtocounter{qno}{1}{Question \theqno}}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Title page
-\title[Basic Python]{Python: Quiz}
-
-\author[FOSSEE Team] {FOSSEE}
-
-\institute[IIT Bombay] {Department of Aerospace Engineering\\IIT Bombay}
-\date[] {11, October 2009\\Day 2}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-
-\begin{document}
-
-\begin{frame}
- \titlepage
-\end{frame}
-
-\begin{frame}
- \frametitle{Write your details...}
-On the top right hand corner please write down the following:
- \begin{itemize}
- \item Name:
- \item Affliation:
- \item Occupation:
- \end{itemize}
-\end{frame}
-
-\begin{frame}[fragile]
-\frametitle{\incqno }
-\begin{lstlisting}
- >>> x = array([[1,2,3,4],[3,4,2,5]])
- >>> x.shape
- (2, 4)
-\end{lstlisting}
-Change the shape of \lstinline+x+ to (4,2)
-\end{frame}
-
-\begin{frame}[fragile]
-\frametitle{\incqno }
-\begin{lstlisting}
- >>> x = array([[1,2,3,4]])
-\end{lstlisting}
-How to change the third element of \lstinline+x+ to 0?
-\end{frame}
-
-\begin{frame}[fragile]
-\frametitle{\incqno }
-What would be the result?
-\begin{lstlisting}
- >>> y = arange(3)
- >>> x = linspace(0,3,3)
- >>> x-y
-\end{lstlisting}
-\end{frame}
-
-\begin{frame}[fragile]
-\frametitle{\incqno }
-\begin{lstlisting}
- >>> x = array([0, 1, 2, 3])
- >>> x.shape = 2,2
- >>> x
- array([[0, 1],
- [2, 3]])
- >>> x[::2,::2]
-\end{lstlisting}
-What is the output?
-\end{frame}
-
-\begin{frame}[fragile]
-\frametitle{\incqno }
-What would be the result?
-\begin{lstlisting}
- >>> x
- array([[0, 1, 2],
- [3, 4, 5],
- [6, 7, 8]])
- >>> x[::-1,:]
-\end{lstlisting}
-Hint:
-\begin{lstlisting}
- >>> x = arange(9)
- >>> x[::-1]
- array([8, 7, 6, 5, 4, 3, 2, 1, 0])
-\end{lstlisting}
-\end{frame}
-
-\begin{frame}[fragile]
-\frametitle{\incqno }
-\begin{lstlisting}
- >>> x
- array([[ 0, 1, 2, 3],
- [ 4, 5, 6, 7],
- [ 8, 9, 10, 11],
- [12, 13, 14, 15]])
-\end{lstlisting}
-How will you get the following \lstinline+x+?
-\begin{lstlisting}
- array([[ 5, 7],
- [ 9, 11]])
-\end{lstlisting}
-\end{frame}
-
-\begin{frame}[fragile]
-\frametitle{\incqno }
-\begin{lstlisting}
- >>> x = array(([1,2,3,4],[2,3,4,5]))
- >>> x[-2][-3] = 4
- >>> x
-\end{lstlisting}
-What will be printed?
-\end{frame}
-
-\begin{frame}[fragile]
-\frametitle{\incqno }
-What would be the output?
-\begin{lstlisting}
- >>> y = arange(4)
- >>> x = array(([1,2,3,2],[1,3,6,0]))
- >>> x + y
-\end{lstlisting}
-\end{frame}
-
-\begin{frame}[fragile]
-\frametitle{\incqno }
-\begin{lstlisting}
- >>> line = plot(x, sin(x))
-\end{lstlisting}
-Use the \lstinline+set_linewidth+ method to set width of \lstinline+line+ to 2.
-\end{frame}
-
-\begin{frame}[fragile]
-\frametitle{\incqno }
-What would be the output?
-\begin{lstlisting}
- >>> x = arange(9)
- >>> y = arange(9.)
- >>> x == y
-\end{lstlisting}
-\end{frame}
-
-
-\end{document}
-