%&p
\begin{document}
\frame{\titlepage}

\section{Introduction}
\begin{frame}
	\frametitle{What is Python}
	\includegraphics[width=\linewidth]{2.png}
\end{frame}

\begin{frame}
	\frametitle{What is Python}
	\begin{itemize}
		\item Interpreted
		\item Duck-typing
		\item High-level
		\item Multi-paradigm
		\item \ldots
	\end{itemize}
\end{frame}

\begin{frame}[fragile]
	\frametitle{How to start}
	\framesubtitle{Interpreter}
	\begin{minted}[breaklines=true]{pycon}
Python 3.5.1 (default, Dec  7 2015, 12:58:09) 
[GCC 5.2.0] on linux
Type "help", "copyright", "credits" or "license" for more
information.
>>> print('Hello world!')
Hello world!
>>> i = 1972
>>> print(str(i/46) + ' hoi')
42.869565217391305 hoi
	\end{minted}
\end{frame}

\begin{frame}[fragile]
	\frametitle{How to start}
	\framesubtitle{Source files}
	\begin{minted}{python}
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

print('hello world')
i = 1972
print(str(i/46) + ' hoi')
	\end{minted}
\end{frame}

\section{Basics}
\begin{frame}[fragile]
	\frametitle{Basictypes}
	\begin{block}{types}
		\begin{tabular}{ll}
			\mintinline{python}{bool} & \mintinline{python}{True, False}\\
			\mintinline{python}{int} & \mintinline{python}{1, -4, 999}\\
			\mintinline{python}{complex} & \mintinline{python}{4j+1, j}\\
			\mintinline{python}{float} & \mintinline{python}
				{1.0, 4.5, 5e9, float('NaN'), float('inf')}\\
			\mintinline{python}{str} & \mintinline{python}
				{'hi', "hi", '"', "'", """hi"""}\\
			\mintinline{python}{list} & \mintinline{python}
				{[], ..., [1, 2, 3], ['a', 42], [[], [1]]}
		\end{tabular}
	\end{block}
	\begin{block}{operators}
		\begin{itemize}
			\item Numbers: \mintinline{python}{+ - / * // % @ **}
			\item Comparison: \mintinline{python}{< <= > >= == != is}
			\item Boolean: \mintinline{python}{and or not}
			\item Bitwise: \mintinline{python}{& | ^ ~ << >>}
			\item List: \mintinline{python}{[i] [i:j] in}
			\item In place: \mintinline{python}{*= += ...}
		\end{itemize}
	\end{block}
\end{frame}

\section{Control flow}
\subsection{If, then, else}
\begin{frame}[fragile]
	\frametitle{Conditional execution}
	\framesubtitle{\texttt{fizzbuzz.py}}
	\begin{minted}{python}
#!/usr/bin/env python3

i = int(input('Enter a number: '))
if i % 3 == 0 and i % 5 == 0:
    print('fizzbuzz')
elif i % 3 == 0:
    print('buzz')
elif i % 5 == 0:
    print('fizz')
else:
    print(i)
	\end{minted}
\end{frame}

\begin{frame}[fragile]
	\frametitle{Conditional execution 2}
	\framesubtitle{\texttt{fizzbuzz.py}}
	\begin{minted}{shell-session}
frobnicator@frobmachine~$ python fizzbuzz.py
Enter a number: 42
buzz
frobnicator@frobmachine~$ python fizzbuzz.py
Enter a number: 15
fizzbuzz
frobnicator@frobmachine~$ python fizzbuzz.py
Enter a number: 43
43
frobnicator@frobmachine~$ python fizzbuzz.py
Enter a number: 9
fizz
	\end{minted}
\end{frame}

\subsection{While, for}
\begin{frame}[fragile]
	\frametitle{Looping}
	\begin{minted}{python}
ls = ["hello", "world", "!"]

# Pythonic for loop
for item in ls:
    print(ls)

# C style for loop
for i in range(0, len(ls)):
    print(ls[i])

# While loop
i = 10
while i >= 0:
    print(i);
print('fire!')
	\end{minted}
\end{frame}

\begin{frame}[fragile]
	\frametitle{Looping: Escape rope}
	\begin{minted}{python}
# 100.000st prime, 100.001st prime, and a pseudoprime
numbers = [1299709, 1299721, 1299709*1299721]
for n in numbers:
    for x in range(2, n):
        if n % x == 0:
            print(n, 'equals', x, '*', n//x)
            break
    else:
        print(n, 'is a prime number')

# 1299709 is a prime number
# 1299721 is a prime number
# 1689259081189 equals 1299709 * 1299721

# pass, continue
	\end{minted}
\end{frame}

\subsection{Functions}
\begin{frame}[fragile]
	\frametitle{Functions}

\end{frame}

\begin{frame}[fragile]
	\frametitle{Functions: Advanced arguments}

\end{frame}

\section{Datastructures}

\section{Input/Output}

\section{Errors}

\section{Standard Library}
\end{document}
