1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
\begin{Aufg}
Ein Roboter soll zum Hürdenlauf programmiert werden.
Der Roboter kann entweder ein Feld gehen oder ein Feld über eine Hürde springen.
Für folgende Laufbahn hat Mike ein Struktogramm erstellt:
\begin{tabular}{p{0.5\textwidth} p{0.5\textwidth}}
\begin{tikzpicture}
\node[draw, minimum size=1cm] (s) at (0, 0) {};
\node[draw, minimum size=1cm] (f2) at (1cm, 0) {};
\node[draw, minimum size=1cm] (h1) at (2cm, 0) {};
\node[draw, minimum size=1cm] (f4) at (3cm, 0) {};
\node[draw, minimum size=1cm] (h2) at (4cm, 0) {};
\node[draw, minimum size=1cm] (f7) at (5cm, 0) {};
\node[minimum size=1cm] at (1.5cm, 0) {\Large $\bm{\pi}$};
\node[minimum size=1cm] at (3.5cm, 0) {\Large $\bm{\pi}$};
\node[isosceles triangle,
draw,
fill=black!20,
minimum size =0.6cm] (T) at (-0.2cm, 0){};
\node[fill, minimum size=2mm] at (h2) {};
\node[fill, minimum size=2mm] at ($(h2) + (0, 3.8mm)$) {};
\node[fill, minimum size=2mm] at ($(h2) - (0, 3.8mm)$) {};
\end{tikzpicture} &
\begin{struktogramm}(60,40)
\while{solange Ziel erreicht}
\whileend
\assign{schritt}
\assign{sprung}
\assign{schritt}
\assign{sprung}
\assign{schritt}
\end{struktogramm} \\
\end{tabular}
Markiere alle Fehler und erkläre jeweils, was Mike falsch gemacht hat.
\end{Aufg}
\begin{Lsg}
\begin{struktogramm}(60,40)
\while{\boldred{1}\HalfpointSymbol solange \boldred{2} \HalfpointSymbol Ziel erreicht}
\whileend
\assign{schritt}
\assign{sprung}
\assign{schritt}
\assign{sprung}
\assign{schritt \boldred{3}\HalfpointSymbol}
\end{struktogramm} \\
\addtocounter{beA}{3}
\begin{enumerate}
\item Wiederholung wiederholt nichts, da der vertikale Kasten Balken fehlt\Halfpoint.
\item Bedingung ist falsch, oder solange müsste ein bis sein\Halfpoint.
\item Letzter Schritt läuft über das Ziel hinaus\Halfpoint.
\end{enumerate}
\end{Lsg}
|