aboutsummaryrefslogtreecommitdiff
path: root/src/Lecture4/slides/6-PythonIntroduction.vrb
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano.tronto@gmail.com>2021-05-25 17:10:49 +0200
committerSebastiano Tronto <sebastiano.tronto@gmail.com>2021-05-25 17:10:49 +0200
commitd6c61d988bfa4255baf9cdae42db59ebee38363f (patch)
tree118ff3c2424e735149c145524965a4a337e50beb /src/Lecture4/slides/6-PythonIntroduction.vrb
parent46eef66b1e1571c77dc828d7e950b129b4c8bfd0 (diff)
downloadmathsoftware-d6c61d988bfa4255baf9cdae42db59ebee38363f.tar.gz
mathsoftware-d6c61d988bfa4255baf9cdae42db59ebee38363f.zip
Added files
Diffstat (limited to 'src/Lecture4/slides/6-PythonIntroduction.vrb')
-rw-r--r--src/Lecture4/slides/6-PythonIntroduction.vrb32
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}

Generated with cgit - Back to sebastiano.tronto.net