day1/Session-1.tex
changeset 24 95fdc10975d5
parent 5 838cedef5e9d
child 42 3e554af428a4
equal deleted inserted replaced
5:838cedef5e9d 24:95fdc10975d5
   148 \end{frame}
   148 \end{frame}
   149 
   149 
   150 \section{Agenda}
   150 \section{Agenda}
   151 \begin{frame}{About the Workshop}
   151 \begin{frame}{About the Workshop}
   152   \begin{block}{Goal of the workshop}
   152   \begin{block}{Goal of the workshop}
   153 	At the end of this program, successful participants will be able to use python as their scripting and problem solving language. Aimed at Engg. students--focus on basic numerics and plotting-- but should serve a similar purpose for others. 
   153 	Successful participants will be able to use python as their scripting and problem solving language. 
   154   \end{block}
   154   \end{block}
       
   155   \begin{block}{Workshop Audience}
       
   156         Aimed at Engg., Mathematics and Science teachers  but should serve a similar purpose for others. 
       
   157   \end{block}
       
   158   \begin{block}{Focus of the workshop}
       
   159         Focus on basic numerics and plotting
       
   160   \end{block}
   155 \end{frame}
   161 \end{frame}
   156 
   162 
   157 \begin{frame}{Checklist}
   163 \begin{frame}{Checklist}
   158   Let us verify that all of us are having the same (similar) tools and environment
   164 	\begin{block}{python}
   159   \begin{description}
   165           Type python at the command line. Do you see version 2.5 or later?
   160 	\item[python] Type python at the command line. Do you see version 2.5 or later?
   166         \end{block}
   161 	\item[IPython] Is IPython available?
   167         \begin{block}{IPython}
   162 	\item[Editor] Which editor? scite, vim, emacs, \ldots
   168           Is IPython available?
   163   \end{description}
   169         \end{block}
       
   170         \begin{block}{Editor}
       
   171           Which editor? scite, vim, emacs, \ldots
       
   172         \end{block}
   164 \end{frame}
   173 \end{frame}
   165 
   174 
   166 \section{Overview}
   175 \section{Overview}
   167 \begin{frame}{Session 1}
   176 \begin{frame}{Session 1}
   168   \begin{itemize}
   177   \begin{itemize}
   181 
   190 
   182 \begin{frame}
   191 \begin{frame}
   183   \frametitle{Introduction}
   192   \frametitle{Introduction}
   184   \begin{itemize}
   193   \begin{itemize}
   185   \item Creator and BDFL: Guido van Rossum
   194   \item Creator and BDFL: Guido van Rossum
   186   \item Conceived in December 1989
   195   \item December 1989
   187   \item ``Python'' as in Monty Python's Flying Circus
   196   \item ``Python'' as in Monty Python's Flying Circus
   188   \item Current stable version of Python is 2.6.x
   197   \item 2.6.x
   189   \item PSF license (like BSD: no strings attached)
   198   \item PSF license (like BSD: no strings attached)
   190   \item Highly cross platform
   199   \item Highly cross platform
   191   \item Runs on the Nokia series 60!
   200   \item Nokia series 60!
   192   \item \alert{Philosophy:} Simple and complete by design
   201   \item \alert{Philosophy:} Simple and complete by design
   193   \end{itemize}
   202   \end{itemize}
   194 \end{frame}
   203 \end{frame}
   195 
   204 
   196 \begin{frame}
   205 \begin{frame}
   209 \end{frame}
   218 \end{frame}
   210 
   219 
   211 \begin{frame}
   220 \begin{frame}
   212   \frametitle{Why Python?}
   221   \frametitle{Why Python?}
   213   \begin{itemize}
   222   \begin{itemize}
   214   \item Designed to be readable and easy to use
   223   \item Readable and easy to use
   215   \item High level, interpreted, modular, OO
   224   \item High level, interpreted, modular, OO
   216   \item Much faster development cycle
   225   \item Much faster development cycle
   217   \item Powerful interactive environment
   226   \item Powerful interactive environment
   218   \item Rapid application development
   227   \item Rapid application development
   219   \item Rich standard library and modules
   228   \item Rich standard library and modules
   250   \end{block}
   259   \end{block}
   251   \inctime{15}
   260   \inctime{15}
   252 \end{frame}
   261 \end{frame}
   253 
   262 
   254 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   263 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   255 % TIME: 15 m, running 15m
   264 % TIME: 10 m, running 10m
   256 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   265 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   257 
   266 
   258 \section{Python}
   267 \section{Python}
   259 
   268 
   260 \subsection{Getting Started}
   269 \subsection{Getting Started}
   355   \end{itemize}
   364   \end{itemize}
   356   \inctime{15}
   365   \inctime{15}
   357 \end{frame}
   366 \end{frame}
   358 
   367 
   359 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   368 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   360 % TIME: 15 m, running 30m
   369 % TIME: 10 m, running 20m
   361 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   370 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   362 
   371 
   363 \subsection{Data types}
   372 \subsection{Data types}
   364 \begin{frame}
   373 \begin{frame}
   365   \frametitle{Basic types}
   374   \frametitle{Basic types}
   366   \begin{itemize}
   375   \begin{itemize}
   367     \item numbers: float, int, long, complex
   376     \item Numbers: float, int, long, complex
   368     \item strings
   377     \item Strings
   369     \item boolean
   378     \item Boolean
   370   \end{itemize}
   379   \end{itemize}
   371   \begin{block}{Also to be discussed later}
   380   \begin{block}{Also to be discussed later}
   372     tuples, lists, dictionaries, functions, objects\ldots
   381     tuples, lists, dictionaries, functions, objects\ldots
   373   \end{block}
   382   \end{block}
   374 \end{frame}
   383 \end{frame}
   408   NOT True\\
   417   NOT True\\
   409   not TRUE
   418   not TRUE
   410   \end{block}
   419   \end{block}
   411 \end{frame}
   420 \end{frame}
   412 
   421 
       
   422 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       
   423 % TIME: 10 m, running 30m
       
   424 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       
   425 
   413 \begin{frame}[fragile]
   426 \begin{frame}[fragile]
   414   \frametitle{Relational and logical operators}
   427   \frametitle{Relational and logical operators}
   415   \begin{lstlisting}
   428   \begin{lstlisting}
   416 >>> a, b, c = -1, 0, 1
   429 >>> a, b, c = -1, 0, 1
   417 >>> a == b
   430 >>> a == b
   589 \end{frame}
   602 \end{frame}
   590 
   603 
   591 \begin{frame}{Simple IO}
   604 \begin{frame}{Simple IO}
   592   \begin{block}
   605   \begin{block}
   593     {Console Input}
   606     {Console Input}
   594     \texttt{raw\_input(}) waits for user input.\\Prompt string is optional.\\
   607     \texttt{raw\_input()} waits for user input.\\Prompt string is optional.\\
   595     All keystrokes are Strings!\\\texttt{int()} converts string to int.
   608     All keystrokes are Strings!\\\texttt{int()} converts string to int.
   596   \end{block}
   609   \end{block}
   597   \begin{block}
   610   \begin{block}
   598     {Console output}
   611     {Console output}
   599     \texttt{print} is straight forward. Major point to remember is the distinction between \texttt{print x} and \texttt{print x,}
   612     \texttt{print} is straight forward. Major point to remember is the distinction between \texttt{print x} and \texttt{print x,}