Added quiz questions.
authorMadhusudan.C.S <madhusudancs@gmail.com>
Thu, 08 Oct 2009 19:45:43 +0530
changeset 85 8ca53181bee6
parent 65 a525e580bc43
child 86 f657495cf8b2
Added quiz questions.
day1/Session-4.tex
quiz.tex
--- a/day1/Session-4.tex	Thu Oct 08 19:00:39 2009 +0530
+++ b/day1/Session-4.tex	Thu Oct 08 19:45:43 2009 +0530
@@ -254,11 +254,13 @@
 \subsection{Functional programming}
 \begin{frame}[fragile]
     \frametitle{Functional programming}
-What is the basic idea?\\
-Why is it interesting?\\
-\typ{map, reduce, filter}\\
-list comprehension\\
-generators
+    \begin{itemize}
+      \item What is the basic idea?
+      \item Why is it interesting?
+      \item \typ{map, reduce, filter}
+      \item list comprehension
+      \item generators
+    \end{itemize}
 \end{frame}
 
 \begin{frame}[fragile]
--- a/quiz.tex	Thu Oct 08 19:00:39 2009 +0530
+++ b/quiz.tex	Thu Oct 08 19:45:43 2009 +0530
@@ -2,10 +2,41 @@
 
 
 \begin{document}
-Which version of Python were you using? 
-List some key differences between IPython and Vanilla Python
-What is the biggest integer number that can be represented by Python?
-What is the result of 17.0 / 2?
-What does '*' * 40 produce?
- 
+\begin{enumerate}
+  \item Which version of Python were you using? 
+  \item List some key differences between IPython and Vanilla Python
+  \item What is the biggest integer number that can be represented by Python?
+  \item What is the result of 17.0 / 2?
+  \item What does '*' * 40 produce?
+  \item List all the basic types available in Python.
+  \item What happens when we run this code?
+  a = False
+  b = True
+  c = True
+  if a and b or c:
+      print ``You are correct!''
+  \item Select last 3 alternative elements in any given list.
+  \item Give the difference between print x and print x,
+  \item A single line of CSV file should be separated into fields. What method would you use to achieve this?
+  \item How many items can a function return?
+  \item If function returns more than one item/object what is the return type of the function?
+  \item How do you document a function?
+  \item Given a list l, what will its slice l[:-1] evaluate to?
+  \item How do you get a slice of the list where the slice has only alternate elements?
+  \item How do you add another list at the end of a given list?
+  \item How do you find if a given element is present in the list or not?
+  \item You are given a tuple a = (1, 2, 5, 7). What happens when you do a[1] = 3?
+  \item We use for to loop through the list elements. What do we have to do if we want to iterate through the elements of the list as well as get the index of the elements of the list as we iterate through?
+  \item What is the difference between import math and from math import *?
+  \item List at least 5 Standard Library Modules.
+  \item How do you create a Python module of your own?
+  \item What can be the keys of a dictionary?
+  \item What happens when you try to access a key in the dictionary that does not exist?
+  \item How do you avoid such an exception?
+  \item How do you obtain all the keys of the dictionary?
+  \item How do you obtain all the values of the dictionary?
+  \item What will the set contain when you create a set from a list containing duplicate elements?
+  \item Name any 2 types of Exception.
+  \item Whats are the 2 IPython command you use for debugging?
+\end{enumerate}
 \end{document}