diff options
Diffstat (limited to 'basic_python/practice_functions.tex')
-rw-r--r-- | basic_python/practice_functions.tex | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/basic_python/practice_functions.tex b/basic_python/practice_functions.tex index f412c71..d71168c 100644 --- a/basic_python/practice_functions.tex +++ b/basic_python/practice_functions.tex @@ -269,7 +269,7 @@ Out[]: ['i', 'am', 'batman'] \begin{frame}[plain,fragile] \frametitle{Exercise: returning a function} \begin{enumerate} - \item Define a function called \typ{power2()} which takes a single argument + \item Define a function called \typ{power2()} which takes no argument \item It should return a function which takes a single argument \typ{x} but returns $2^x$ \end{enumerate} @@ -278,7 +278,7 @@ Out[]: ['i', 'am', 'batman'] In []: f = power2() In []: f(2) Out[]: 4 - In []: power(2)(4) + In []: power2()(4) Out[]: 16 \end{lstlisting} \end{frame} |