day1/session3.tex
changeset 387 5e485a5d8ac4
parent 385 c70118cdde66
child 389 aa392117454f
equal deleted inserted replaced
386:a0bec380b44f 387:5e485a5d8ac4
   309   \end{small}
   309   \end{small}
   310   \inctime{10}
   310   \inctime{10}
   311 \end{frame}
   311 \end{frame}
   312 
   312 
   313 \begin{frame}[fragile]
   313 \begin{frame}[fragile]
       
   314   \frametitle{Inserting elements into dictionary}
       
   315   \emphbar{\alert{d[key] = value}}
       
   316   \begin{lstlisting}
       
   317     In []: d['bin'] = 'binary file'
       
   318     In []: d
       
   319     Out[]: 
       
   320     {'bin': 'binary file',
       
   321      'cpp': 'complex code',
       
   322      'java': 'bad code',
       
   323      'png': 'image file',
       
   324      'py': 'python code',
       
   325      'txt': 'text file'}
       
   326   \end{lstlisting}
       
   327 \end{frame}
       
   328 
       
   329 \begin{frame}[fragile]
   314   \frametitle{Getting back to the problem}
   330   \frametitle{Getting back to the problem}
   315   Let our dictionary be:
   331   Let our dictionary be:
   316   \begin{lstlisting}
   332   \begin{lstlisting}
   317 science = {}
   333 science = {}
   318   \end{lstlisting}
   334   \end{lstlisting}