diff options
Diffstat (limited to 'advanced-features-functions/slides.tex')
-rw-r--r-- | advanced-features-functions/slides.tex | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/advanced-features-functions/slides.tex b/advanced-features-functions/slides.tex index 311be4f..9e1d66f 100644 --- a/advanced-features-functions/slides.tex +++ b/advanced-features-functions/slides.tex @@ -1,4 +1,4 @@ -% Created 2010-10-11 Mon 00:34 +% Created 2010-10-28 Thu 11:37 \documentclass[presentation]{beamer} \usepackage[latin1]{inputenc} \usepackage[T1]{fontenc} @@ -8,6 +8,7 @@ \usepackage{float} \usepackage{wrapfig} \usepackage{soul} +\usepackage{t1enc} \usepackage{textcomp} \usepackage{marvosym} \usepackage{wasysym} @@ -62,11 +63,10 @@ showstringspaces=false, keywordstyle=\color{blue}\bfseries} \frametitle{Solution 1} \label{sec-3} -\lstset{language=Python} -\begin{lstlisting} +\begin{verbatim} def welcome(name="World", greet): print greet, name -\end{lstlisting} +\end{verbatim} We get an error that reads \texttt{SyntaxError: non-default argument follows default argument}. When defining a function all the argument with default values should come at the end. \end{frame} @@ -81,10 +81,9 @@ def welcome(name="World", greet): \frametitle{Solution 2} \label{sec-5} -\lstset{language=Python} -\begin{lstlisting} +\begin{verbatim} linspace? -\end{lstlisting} +\end{verbatim} \end{frame} \begin{frame} \frametitle{Question 3} @@ -98,13 +97,12 @@ linspace? \frametitle{Solution 3} \label{sec-7} -\lstset{language=Python} -\begin{lstlisting} +\begin{verbatim} def welcome(greet="Hello", name="World"): print greet, name welcome() -\end{lstlisting} +\end{verbatim} \end{frame} \begin{frame} \frametitle{Summary} |