day2/session1.tex
changeset 344 19754ed6050f
parent 339 8ac5fe07810f
child 359 cb17c87b090e
equal deleted inserted replaced
343:adb85e126341 344:19754ed6050f
   545     \item Conditional structures: \kwrd{if/elif/else},\\ \kwrd{C if X else Y}
   545     \item Conditional structures: \kwrd{if/elif/else},\\ \kwrd{C if X else Y}
   546   \end{itemize}
   546   \end{itemize}
   547 \end{frame}
   547 \end{frame}
   548 
   548 
   549 \end{document}
   549 \end{document}
       
   550 
       
   551 %% Questions for Quiz %%
       
   552 %% ------------------ %%
       
   553 
       
   554 
       
   555 \begin{frame}
       
   556 \frametitle{\incqno }
       
   557   What is the largest integer value that can be represented natively by Python?
       
   558 \end{frame}
       
   559 
       
   560 \begin{frame}
       
   561 \frametitle{\incqno }
       
   562   What is the result of 17.0 / 2?
       
   563 \end{frame}
       
   564 
       
   565 \begin{frame}
       
   566 \frametitle{\incqno }
       
   567   Which of the following is not a type in Python?
       
   568   \begin{enumerate}
       
   569     \item int
       
   570     \item float
       
   571     \item char
       
   572     \item string
       
   573   \end{enumerate}
       
   574 \end{frame}
       
   575 
       
   576 \begin{frame}
       
   577 \frametitle{\incqno }
       
   578 How do you create a complex number with real part 2 and imaginary part
       
   579 0.5.
       
   580 \end{frame}
       
   581 
       
   582 \begin{frame}
       
   583 \frametitle{\incqno }
       
   584   What is the difference between \kwrd{print} \emph{x} and \kwrd{print} \emph{x,} ?
       
   585 \end{frame}
       
   586 
       
   587 \begin{frame}
       
   588 \frametitle{\incqno }
       
   589   What does '*' * 40 produce?
       
   590 \end{frame}
       
   591 
       
   592 \begin{frame}[fragile]
       
   593 \frametitle{\incqno }
       
   594     What is the output of:
       
   595     \begin{lstlisting}
       
   596 In []: ', '.join(['a', 'b', 'c'])
       
   597     \end{lstlisting}
       
   598 \end{frame}
       
   599 
       
   600 
       
   601 \begin{frame}[fragile]
       
   602     \frametitle{\incqno}
       
   603   \begin{lstlisting}
       
   604 In []: 47 % 3 
       
   605   \end{lstlisting}
       
   606   What is the output?
       
   607 \end{frame}
       
   608