summaryrefslogtreecommitdiff
path: root/day1/session3.tex
diff options
context:
space:
mode:
Diffstat (limited to 'day1/session3.tex')
-rw-r--r--day1/session3.tex19
1 files changed, 10 insertions, 9 deletions
diff --git a/day1/session3.tex b/day1/session3.tex
index 2de2634..567a12c 100644
--- a/day1/session3.tex
+++ b/day1/session3.tex
@@ -162,28 +162,29 @@ In []: for line in open('pendulum.txt'):
\begin{frame}[fragile]
\frametitle{Mean ``g''}
\begin{lstlisting}
-total = 0
-for g in G:
- total += g
+In []: total = 0
+In []: for g in G:
+ ....: total += g
+ ....:
-g_mean = total / len(G)
-print 'Mean: ', g_mean
+In []: g_mean = total / len(G)
+In []: print 'Mean: ', g_mean
\end{lstlisting}
\end{frame}
\begin{frame}[fragile]
\frametitle{Mean ``g''}
\begin{lstlisting}
-g_mean = sum(G) / len(G)
-print 'Mean: ', g_mean
+In []: g_mean = sum(G) / len(G)
+In []: print 'Mean: ', g_mean
\end{lstlisting}
\end{frame}
\begin{frame}[fragile]
\frametitle{Mean ``g''}
\begin{lstlisting}
-g_mean = mean(G)
-print 'Mean: ', g_mean
+In []: g_mean = mean(G)
+In []: print 'Mean: ', g_mean
\end{lstlisting}
\inctime{10}
\end{frame}