58 \item University/College/Company: |
58 \item University/College/Company: |
59 \item Student/Teacher/Professional: |
59 \item Student/Teacher/Professional: |
60 \end{itemize} |
60 \end{itemize} |
61 \end{frame} |
61 \end{frame} |
62 |
62 |
|
63 \begin{frame} |
|
64 \frametitle{\incqno } |
|
65 What is the largest integer value that can be represented natively by Python? |
|
66 \end{frame} |
|
67 |
|
68 \begin{frame} |
|
69 \frametitle{\incqno } |
|
70 What is the result of 17.0 / 2? |
|
71 \end{frame} |
|
72 |
|
73 \begin{frame} |
|
74 \frametitle{\incqno } |
|
75 Which of the following is not a type in Python? |
|
76 \begin{enumerate} |
|
77 \item int |
|
78 \item float |
|
79 \item char |
|
80 \item string |
|
81 \end{enumerate} |
|
82 \end{frame} |
|
83 |
|
84 \begin{frame} |
|
85 \frametitle{\incqno } |
|
86 How do you create a complex number with real part 2 and imaginary part |
|
87 0.5. |
|
88 \end{frame} |
|
89 |
|
90 \begin{frame} |
|
91 \frametitle{\incqno } |
|
92 What is the difference between \kwrd{print} \emph{x} and \kwrd{print} \emph{x,} ? |
|
93 \end{frame} |
|
94 |
|
95 \begin{frame} |
|
96 \frametitle{\incqno } |
|
97 What does '*' * 40 produce? |
|
98 \end{frame} |
|
99 |
|
100 \begin{frame}[fragile] |
|
101 \frametitle{\incqno } |
|
102 What is the output of: |
|
103 \begin{lstlisting} |
|
104 In []: ', '.join(['a', 'b', 'c']) |
|
105 \end{lstlisting} |
|
106 \end{frame} |
|
107 |
|
108 |
|
109 \begin{frame}[fragile] |
|
110 \frametitle{\incqno} |
|
111 \begin{lstlisting} |
|
112 In []: 47 % 3 |
|
113 \end{lstlisting} |
|
114 What is the output? |
|
115 \end{frame} |
|
116 |
|
117 \begin{frame} |
|
118 \frametitle{\incqno} |
|
119 How do you find the presence of an element \emph{x} in the list \emph{a}? |
|
120 \end{frame} |
|
121 |
|
122 |
|
123 \begin{frame}[fragile] |
|
124 \frametitle{\incqno} |
|
125 \begin{lstlisting} |
|
126 In []: set([1, 2, 8, 2, 13, 8, 9]) |
|
127 \end{lstlisting} |
|
128 What is the output? |
|
129 \end{frame} |
|
130 |
|
131 \begin{frame}[fragile] |
|
132 \frametitle{\incqno} |
|
133 \begin{lstlisting} |
|
134 In []: a = {'a': 1, 'b': 2} |
|
135 In []: a['a'] = 10 |
|
136 pIn []: print a |
|
137 \end{lstlisting} |
|
138 What is the output? |
|
139 \end{frame} |
|
140 |
|
141 \begin{frame}[fragile] |
|
142 \frametitle{\incqno} |
|
143 \begin{lstlisting} |
|
144 In []: for i in range(3, 10, 2): |
|
145 ...: print i |
|
146 \end{lstlisting} |
|
147 What is the output? |
|
148 \end{frame} |
|
149 |
|
150 \begin{frame}[fragile] |
|
151 \frametitle{\incqno} |
|
152 \begin{lstlisting} |
|
153 In []: a = [1, 2, 3] |
|
154 In []: a.extend([5, 6]) |
|
155 \end{lstlisting} |
|
156 What is the value of a? |
|
157 \end{frame} |
|
158 |
|
159 \begin{frame}[fragile] |
|
160 \frametitle{\incqno} |
|
161 \begin{lstlisting} |
|
162 In []: a = (1, 2, 3) |
|
163 In []: a[1] = 10 |
|
164 \end{lstlisting} |
|
165 What is the result? |
|
166 \end{frame} |
|
167 |
|
168 \begin{frame}[fragile] |
|
169 \frametitle{\incqno} |
|
170 \begin{lstlisting} |
|
171 def func(x, y=10): |
|
172 print x+1, y+10 |
|
173 |
|
174 func(1) |
|
175 |
|
176 \end{lstlisting} |
|
177 What is the output? |
|
178 \end{frame} |
|
179 |
|
180 \begin{frame} |
|
181 \frametitle{\incqno} |
|
182 How many items can a function return? |
|
183 \end{frame} |
|
184 |
63 \end{document} |
185 \end{document} |
64 |
186 |