summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPuneeth Chaganti2010-01-10 16:57:51 +0530
committerPuneeth Chaganti2010-01-10 16:57:51 +0530
commit71b470de4c5b6dee3e59efd9d94d188e74622772 (patch)
tree2b7425f5277941915706e732ddd0d6cb608fb808
parent268a25c7e1721e7a0c51080dd128b68d0ad3a4d5 (diff)
downloadworkshops-more-scipy-71b470de4c5b6dee3e59efd9d94d188e74622772.tar.gz
workshops-more-scipy-71b470de4c5b6dee3e59efd9d94d188e74622772.tar.bz2
workshops-more-scipy-71b470de4c5b6dee3e59efd9d94d188e74622772.zip
Moved all day2 quiz questions to end of day2-sessions.
-rw-r--r--day2/session1.tex59
-rw-r--r--day2/session2.tex67
-rw-r--r--day2/session3.tex8
-rw-r--r--day2/session4.tex22
-rwxr-xr-xday2quiz.tex153
5 files changed, 156 insertions, 153 deletions
diff --git a/day2/session1.tex b/day2/session1.tex
index 8d7c70e..5c083f2 100644
--- a/day2/session1.tex
+++ b/day2/session1.tex
@@ -547,3 +547,62 @@ num = int(a) if a != 'Q' else 0
\end{frame}
\end{document}
+
+%% Questions for Quiz %%
+%% ------------------ %%
+
+
+\begin{frame}
+\frametitle{\incqno }
+ What is the largest integer value that can be represented natively by Python?
+\end{frame}
+
+\begin{frame}
+\frametitle{\incqno }
+ What is the result of 17.0 / 2?
+\end{frame}
+
+\begin{frame}
+\frametitle{\incqno }
+ Which of the following is not a type in Python?
+ \begin{enumerate}
+ \item int
+ \item float
+ \item char
+ \item string
+ \end{enumerate}
+\end{frame}
+
+\begin{frame}
+\frametitle{\incqno }
+How do you create a complex number with real part 2 and imaginary part
+0.5.
+\end{frame}
+
+\begin{frame}
+\frametitle{\incqno }
+ What is the difference between \kwrd{print} \emph{x} and \kwrd{print} \emph{x,} ?
+\end{frame}
+
+\begin{frame}
+\frametitle{\incqno }
+ What does '*' * 40 produce?
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{\incqno }
+ What is the output of:
+ \begin{lstlisting}
+In []: ', '.join(['a', 'b', 'c'])
+ \end{lstlisting}
+\end{frame}
+
+
+\begin{frame}[fragile]
+ \frametitle{\incqno}
+ \begin{lstlisting}
+In []: 47 % 3
+ \end{lstlisting}
+ What is the output?
+\end{frame}
+
diff --git a/day2/session2.tex b/day2/session2.tex
index d40f9d2..c64ca87 100644
--- a/day2/session2.tex
+++ b/day2/session2.tex
@@ -536,3 +536,70 @@ def what( n ):
\end{frame}
\end{document}
+
+%% Questions for Quiz %%
+%% ------------------ %%
+
+\begin{frame}
+ \frametitle{\incqno}
+ How do you find the presence of an element \emph{x} in the list \emph{a}?
+\end{frame}
+
+
+\begin{frame}[fragile]
+ \frametitle{\incqno}
+ \begin{lstlisting}
+In []: set([1, 2, 8, 2, 13, 8, 9])
+ \end{lstlisting}
+ What is the output?
+\end{frame}
+
+\begin{frame}[fragile]
+ \frametitle{\incqno}
+ \begin{lstlisting}
+In []: a = {'a': 1, 'b': 2}
+In []: a['a'] = 10
+In []: print a
+ \end{lstlisting}
+ What is the output?
+\end{frame}
+
+\begin{frame}[fragile]
+ \frametitle{\incqno}
+ \begin{lstlisting}
+In []: for i in range(3, 10, 2):
+ ...: print i
+ \end{lstlisting}
+ What is the output?
+\end{frame}
+
+\begin{frame}[fragile]
+ \frametitle{\incqno}
+ \begin{lstlisting}
+In []: a = [1, 2, 3]
+In []: a.extend([5, 6])
+ \end{lstlisting}
+ What is the value of a?
+\end{frame}
+
+\begin{frame}[fragile]
+ \frametitle{\incqno}
+ \begin{lstlisting}
+In []: a = (1, 2, 3)
+In []: a[1] = 10
+ \end{lstlisting}
+ What is the result?
+\end{frame}
+
+\begin{frame}[fragile]
+ \frametitle{\incqno}
+ \begin{lstlisting}
+def func(x, y=10):
+ print x+1, y+10
+
+func(1)
+
+ \end{lstlisting}
+ What is the output?
+\end{frame}
+
diff --git a/day2/session3.tex b/day2/session3.tex
index 97ecf59..61bcbe3 100644
--- a/day2/session3.tex
+++ b/day2/session3.tex
@@ -432,3 +432,11 @@ for line in urllib2.urlopen('http://site.com'):
\end{frame}
\end{document}
+
+%% Questions for Quiz %%
+%% ------------------ %%
+
+\begin{frame}
+ \frametitle{\incqno}
+ How many items can a function return?
+\end{frame}
diff --git a/day2/session4.tex b/day2/session4.tex
index 7345b7e..eb89a2a 100644
--- a/day2/session4.tex
+++ b/day2/session4.tex
@@ -429,6 +429,28 @@ We have covered:
\end{document}
+%% \begin{frame}[fragile]
+%% \frametitle{\incqno}
+%% Consider a module called \lstinline+gcd.py+ looking like this:
+%% \begin{lstlisting}
+%% def gcd(a, b):
+%% ...
+
+%% if __name__ == '__main__':
+%% print gcd(10, 25)
+%% \end{lstlisting}
+%% If this module is imported, will it print the gcd of 10 and 25?
+%% \end{frame}
+
+%% \begin{frame}[fragile]
+%% \frametitle{\incqno}
+%% \begin{lstlisting}
+%% In [1]: print hello
+%% \end{lstlisting}
+%% Exactly what exception will you get if you run this on a fresh
+%% interpreter?
+%% \end{frame}
+
%% \begin{frame}
%% \frametitle{Testing}
diff --git a/day2quiz.tex b/day2quiz.tex
index 50f40dd..badefbc 100755
--- a/day2quiz.tex
+++ b/day2quiz.tex
@@ -60,158 +60,5 @@ On the top right hand corner please write down the following:
\end{itemize}
\end{frame}
-
-\begin{frame}
-\frametitle{\incqno }
- What is the largest integer value that can be represented natively by Python?
-\end{frame}
-
-\begin{frame}
-\frametitle{\incqno }
- What is the result of 17.0 / 2?
-\end{frame}
-
-\begin{frame}
-\frametitle{\incqno }
- Which of the following is not a type in Python?
- \begin{enumerate}
- \item int
- \item float
- \item char
- \item string
- \end{enumerate}
-\end{frame}
-
-\begin{frame}
-\frametitle{\incqno }
-How do you create a complex number with real part 2 and imaginary part
-0.5.
-\end{frame}
-
-\begin{frame}
-\frametitle{\incqno }
- What is the difference between \kwrd{print} \emph{x} and \kwrd{print} \emph{x,} ?
-\end{frame}
-
-\begin{frame}
-\frametitle{\incqno }
- What does '*' * 40 produce?
-\end{frame}
-
-\begin{frame}[fragile]
-\frametitle{\incqno }
- What is the output of:
- \begin{lstlisting}
-In []: ', '.join(['a', 'b', 'c'])
- \end{lstlisting}
-\end{frame}
-
-\begin{frame}
- \frametitle{\incqno}
- How do you find the presence of an element \emph{x} in the list \emph{a}?
-\end{frame}
-
-\begin{frame}[fragile]
- \frametitle{\incqno}
- \begin{lstlisting}
-In []: set([1, 2, 8, 2, 13, 8, 9])
- \end{lstlisting}
- What is the output?
-\end{frame}
-
-\begin{frame}[fragile]
- \frametitle{\incqno}
- \begin{lstlisting}
-In []: 47 % 3
- \end{lstlisting}
- What is the output?
-\end{frame}
-
-\begin{frame}[fragile]
- \frametitle{\incqno}
- \begin{lstlisting}
-In []: a = 12
-In []: a *= 1+1
- \end{lstlisting}
- What is the value of a?
-\end{frame}
-
-\begin{frame}[fragile]
- \frametitle{\incqno}
- \begin{lstlisting}
-In []: a = {'a': 1, 'b': 2}
-In []: a['a'] = 10
-In []: print a
- \end{lstlisting}
- What is the output?
-\end{frame}
-
-\begin{frame}[fragile]
- \frametitle{\incqno}
- \begin{lstlisting}
-In []: for i in range(3, 10, 2):
- ...: print i
- \end{lstlisting}
- What is the output?
-\end{frame}
-
-\begin{frame}[fragile]
- \frametitle{\incqno}
- \begin{lstlisting}
-In []: a = [1, 2, 3]
-In []: a.extend([5, 6])
- \end{lstlisting}
- What is the value of a?
-\end{frame}
-
-\begin{frame}[fragile]
- \frametitle{\incqno}
- \begin{lstlisting}
-In []: a = (1, 2, 3)
-In []: a[1] = 10
- \end{lstlisting}
- What is the result?
-\end{frame}
-
-\begin{frame}[fragile]
- \frametitle{\incqno}
- \begin{lstlisting}
-def func(x, y=10):
- print x+1, y+10
-
-func(1)
-
- \end{lstlisting}
-
- What is the output?
-\end{frame}
-
-\begin{frame}
- \frametitle{\incqno}
- How many items can a function return?
-\end{frame}
-
-%% \begin{frame}[fragile]
-%% \frametitle{\incqno}
-%% Consider a module called \lstinline+gcd.py+ looking like this:
-%% \begin{lstlisting}
-%% def gcd(a, b):
-%% ...
-
-%% if __name__ == '__main__':
-%% print gcd(10, 25)
-%% \end{lstlisting}
-%% If this module is imported, will it print the gcd of 10 and 25?
-%% \end{frame}
-
-%% \begin{frame}[fragile]
-%% \frametitle{\incqno}
-%% \begin{lstlisting}
-%% In [1]: print hello
-%% \end{lstlisting}
-%% Exactly what exception will you get if you run this on a fresh
-%% interpreter?
-%% \end{frame}
-
\end{document}