7 \frametitle{What is Python
}
8 \includegraphics[width=
\linewidth]{2.png
}
12 \frametitle{What is Python
}
22 \begin{frame
}[fragile
]
23 \frametitle{How to start
}
24 \framesubtitle{Interpreter
}
25 \begin{minted
}[breaklines=true
]{pycon
}
26 Python
3.5.1 (default, Dec
7 2015,
12:
58:
09)
28 Type "help", "copyright", "credits" or "license" for more
30 >>> print('Hello world!')
33 >>> print(str(i/
46) + ' hoi')
34 42.869565217391305 hoi
38 \begin{frame
}[fragile
]
39 \frametitle{How to start
}
40 \framesubtitle{Source files
}
41 \begin{minted
}{python
}
42 #!/usr/bin/env python3
43 # -*- coding: utf-
8 -*-
47 print(str(i/
46) + ' hoi')
52 \begin{frame
}[fragile
]
53 \frametitle{Basictypes
}
56 \mintinline{python
}{bool
} &
\mintinline{python
}{True, False
}\\
57 \mintinline{python
}{int
} &
\mintinline{python
}{1, -
4,
999}\\
58 \mintinline{python
}{complex
} &
\mintinline{python
}{4j+
1, j
}\\
59 \mintinline{python
}{float
} &
\mintinline{python
}
60 {1.0,
4.5,
5e9, float('NaN'), float('inf')
}\\
61 \mintinline{python
}{str
} &
\mintinline{python
}
62 {'hi', "hi", '"', "'", """hi"""
}\\
63 \mintinline{python
}{list
} &
\mintinline{python
}
64 {[], ...,
[1,
2,
3],
['a',
42],
[[],
[1]]}
67 \begin{block
}{operators
}
69 \item Numbers:
\mintinline{python
}{+ - / * //
% @ **}
70 \item Comparison:
\mintinline{python
}{< <= > >= == != is
}
71 \item Boolean:
\mintinline{python
}{and or not
}
72 \item Bitwise:
\mintinline{python
}{& | ^ ~ << >>
}
73 \item List:
\mintinline{python
}{[i
] [i:j
] in
}
74 \item In place:
\mintinline{python
}{*= += ...
}
79 \section{Control flow
}
80 \subsection{If, then, else
}
81 \begin{frame
}[fragile
]
82 \frametitle{Conditional execution
}
83 \framesubtitle{\texttt{fizzbuzz.py
}}
84 \begin{minted
}{python
}
85 #!/usr/bin/env python3
87 i = int(input('Enter a number: '))
88 if i
% 3 == 0 and i % 5 == 0:
99 \begin{frame
}[fragile
]
100 \frametitle{Conditional execution
2}
101 \framesubtitle{\texttt{fizzbuzz.py
}}
102 \begin{minted
}{shell-session
}
103 frobnicator@frobmachine~$ python fizzbuzz.py
106 frobnicator@frobmachine~$ python fizzbuzz.py
109 frobnicator@frobmachine~$ python fizzbuzz.py
112 frobnicator@frobmachine~$ python fizzbuzz.py
118 \subsection{While, for
}
120 \subsection{Functions
}
122 \section{Datastructures
}
124 \section{Input/Output
}
128 \section{Standard Library
}