diff options
Diffstat (limited to 'src/Lecture4/slides/6-PythonIntroduction.vrb')
| -rw-r--r-- | src/Lecture4/slides/6-PythonIntroduction.vrb | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/Lecture4/slides/6-PythonIntroduction.vrb b/src/Lecture4/slides/6-PythonIntroduction.vrb new file mode 100644 index 0000000..401cc07 --- /dev/null +++ b/src/Lecture4/slides/6-PythonIntroduction.vrb | |||
| @@ -0,0 +1,32 @@ | |||
| 1 | \frametitle{\texttt {while} loop} | ||
| 2 | \begin{columns} | ||
| 3 | \column{0.45\textwidth} | ||
| 4 | \texttt{{\bf while} \emph{condition}:} | ||
| 5 | |||
| 6 | \texttt{\qquad instruction1} | ||
| 7 | |||
| 8 | \texttt{\qquad instruction2} | ||
| 9 | |||
| 10 | \texttt{\qquad \dots} | ||
| 11 | \column{0.55\textwidth} | ||
| 12 | \begin{tikzpicture} | ||
| 13 | \tikzstyle{s} = [rectangle, rounded corners, text centered, | ||
| 14 | draw=black, fill=red!30] | ||
| 15 | \tikzstyle{p} = [rectangle, text centered, draw=black, fill=orange!30] | ||
| 16 | \tikzstyle{d} = [rectangle, text centered, draw=black, fill=green!30] | ||
| 17 | |||
| 18 | \node(start) [s] {Start}; | ||
| 19 | \node(cond) [d, below of=start] {\texttt{\emph{condition}}?}; | ||
| 20 | \node(inst1) [p, right of=cond, xshift=2.7cm] {\texttt{instruction1}}; | ||
| 21 | \node(inst2) [p, below of=inst1] {\texttt{instruction2}}; | ||
| 22 | \node(dots) [p, below of=inst2] {\texttt{\dots}}; | ||
| 23 | \node(end) [s, below of=other, yshift=-0.5cm] {End}; | ||
| 24 | |||
| 25 | \draw[->] (start) -- (cond); | ||
| 26 | \draw[->] (cond) -- node[anchor=south] {\texttt{True}} (inst1); | ||
| 27 | \draw[->] (inst1) -- (inst2); | ||
| 28 | \draw[->] (inst2) -- (dots); | ||
| 29 | \draw[->] (cond) -- node[anchor=east] {\texttt{False}} (end); | ||
| 30 | \draw[->] (dots) -| ($(cond.south)+(0.4,0)$); | ||
| 31 | \end{tikzpicture} | ||
| 32 | \end{columns} | ||
