diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2023-10-24 15:30:17 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2023-10-24 15:47:20 +0200 |
| commit | 7f807a28237428afdabc75b1a73fdf4c984dae7d (patch) | |
| tree | af3aa10a0234fd015a0b554f75a7552a6e36d311 /Info | |
| parent | 1553b502a1fe5c2effe1c12cf2d7d268f21c4e6d (diff) | |
| download | unterricht-7f807a28237428afdabc75b1a73fdf4c984dae7d.tar.gz unterricht-7f807a28237428afdabc75b1a73fdf4c984dae7d.zip | |
add my basic algortihm handout
Diffstat (limited to 'Info')
| -rw-r--r-- | Info/11/MUG_SWG_SG/1/GrundlagenAB/handout.tex | 102 | ||||
| l--------- | Info/11/MUG_SWG_SG/1/GrundlagenAB/img/and_block.png | 1 | ||||
| -rw-r--r-- | Info/11/MUG_SWG_SG/1/GrundlagenAB/img/for_block.png | bin | 0 -> 12860 bytes | |||
| l--------- | Info/11/MUG_SWG_SG/1/GrundlagenAB/img/if_block.png | 1 | ||||
| l--------- | Info/11/MUG_SWG_SG/1/GrundlagenAB/img/if_else_block.png | 1 | ||||
| l--------- | Info/11/MUG_SWG_SG/1/GrundlagenAB/img/not_block.png | 1 | ||||
| l--------- | Info/11/MUG_SWG_SG/1/GrundlagenAB/img/or_block.png | 1 | ||||
| l--------- | Info/11/MUG_SWG_SG/1/GrundlagenAB/img/repeat_block.png | 1 | ||||
| l--------- | Info/11/MUG_SWG_SG/1/GrundlagenAB/img/repeat_n_block.png | 1 | ||||
| l--------- | Info/11/MUG_SWG_SG/1/GrundlagenAB/img/repeat_until_block.png | 1 | ||||
| l--------- | Info/11/MUG_SWG_SG/1/GrundlagenAB/img/variables_as_boxes.png | 1 |
11 files changed, 111 insertions, 0 deletions
diff --git a/Info/11/MUG_SWG_SG/1/GrundlagenAB/handout.tex b/Info/11/MUG_SWG_SG/1/GrundlagenAB/handout.tex new file mode 100644 index 00000000..9c3cf24a --- /dev/null +++ b/Info/11/MUG_SWG_SG/1/GrundlagenAB/handout.tex @@ -0,0 +1,102 @@ +\documentclass[]{handout} + +\usepackage[shortlabels]{enumitem} +\usepackage{tabulary} + +\title{Grundlagen der Algorithmik} + +\begin{document} +\thispagestyle{empty} + +\subsection*{Abläufe und Algorithmen} + +\begin{defbox}{Grundbegriffe} +\begin{itemize} +\item \textbf{Anweisung} := Beschreibung eines Arbeitsschrittes +\item \textbf{Ablauf/Sequenz} := Abfolge von \textbf{Anweisungen} +\item \textbf{Algorithmus} := \textbf{Endlicher}, \textbf{ausführbarer} und \textbf{eindeutiger} Ablauf +\end{itemize} +\end{defbox} + +\subsection*{Variablen} + +\textbf{Variablen} erlauben es Informationen in einem Algorithmus zu speichern und wiederzuverwenden. + +\begin{center} +\includegraphics[keepaspectratio, height=4cm]{img/variables_as_boxes.png} +\end{center} + +\begin{defbox}{} +\begin{itemize} +\item \textbf{Variablen} kann man sich wie Schachteln mit Namen vorstellen, in denen man einen Zettel mit der gemerkten Information aufbewahrt. + +\item Die gespeicherten Informationen kann man in Klassen sogenannte \textbf{Datentypen}, wie \textit{Text}, \textit{Zahlen} oder \textit{Wahrheitswerte} gruppieren. + +\item Das Erzeugen einer \textbf{Variable} nennt man \textbf{Deklarieren}. +\item Das erstmalige \textit{Zuweisen} einer Information nennt man \textbf{Initialisieren}. +\end{itemize} +\end{defbox} + +\subsection*{Kontrollstrukturen} +Mit \textbf{Kontrollstrukturen} kann die Reihenfolge von Anweisungen in einem Algorithmus flexibel gestaltet werden. + +\textbf{Kontrollstrukturen} können weitere Kontrollstrukturen enthalten. + +\subsubsection*{Wiederholungen (Schleifen)} +Eine \textbf{Kontrollstruktur}, die \textbf{Anweisungen} gegebenenfalls mehrmals \textit{wiederholt}, wird \textbf{Wiederholung} oder \textbf{Schleife} genannt. \vspace{0.5cm} + +\begin{defbox}{Arten von Wiederholungen} +\begin{tabularx}{\textwidth}{X X X} +\textbf{Bedingte Wiederholung} & \textbf{Wiederholung mit} \newline \textbf{fester Zahl} & \textbf{Fortlaufende} \newline \textbf{Wiederholung} \\ +\includegraphics[keepaspectratio, height=2cm]{img/repeat_until_block.png} & \includegraphics[keepaspectratio, height=2cm]{img/repeat_n_block.png} & \includegraphics[keepaspectratio, height=2cm]{img/repeat_block.png} \\ +\textit{"Wiederhole solange bis ..."} & \textit{"Wiederhole X-mal"} & \textit{"Wiederhole ..."} \\ +\end{tabularx} +\end{defbox} +\newpage + +\subsubsection*{Bedingte Anweisungen} + +\textbf{Bedingte Anweisungen} erlauben es \textbf{Anweisungen} nur unter gewissen Umständen auszuführen. \vspace{0.5cm} + +\begin{defbox}{} +\begin{tabularx}{\textwidth}{X X} +\textbf{Einseitige bedingte Anweisung} & \textbf{Zweiseitige bedingte Anweisung} \\ +\includegraphics[keepaspectratio, height=2cm]{img/if_block.png} & \includegraphics[keepaspectratio, height=2cm]{img/if_else_block.png} \\ +\textit{"Wenn dann ..."} & \textit{"Wenn dann ... sonst ..."} \\ +\end{tabularx} +\end{defbox} + +\subsection*{Logische Operatoren} + +Mit \textbf{logische Operationen} lassen sich \textit{Wahrheitswerte} zu anderen \textit{Wahrheitswerten} \textbf{umformen} oder \textbf{zusammenfassen}. +\vspace{0.5cm} + +\begin{defbox}{} +\begin{tabularx}{\textwidth}{X X X} +\textbf{Und} (engl. \textbf{and}) & \textbf{Oder} (engl. \textbf{or}) & \textbf{Nicht} (engl. \textbf{not}) \\ + +\includegraphics[keepaspectratio, width=0.3\textwidth]{img/and_block.png} & \includegraphics[keepaspectratio, width=0.3\textwidth]{img/or_block.png} & \includegraphics[keepaspectratio, width=0.3\textwidth]{img/not_block.png} \\ + +Das Ergebnis ist nur dann \textit{wahr}, wenn \underline{alle} Eingabewerte \textit{wahr} sind. & +Das Ergebnis ist \textit{wahr}, wenn \underline{mindestens} einer der Eingabewerte \textit{wahr} sind & +Das Ergebnis ist \textit{wahr}, wenn die Eingabe \textit{falsch} ist, und \textit{falsch}, wenn die Eingabe \textit{wahr} ist. \\ +\end{tabularx} +\end{defbox} + +Die Ergebnisse der \textbf{logischen Operationen} können aus der folgenden \textbf{Wahrheitstabelle} abgelesen werden. + +\begin{center} +\begin{tabulary}{\textwidth}{C | C | C | C | C} +\rowcolor{gray!40}Wert1 & Wert2 & Wert1 \textbf{UND} Wert2 & Wert1 \textbf{ODER} \newline Wert2 & \textbf{NICHT} WERT1 \\ +\hline +\cellcolor{green!30} Wahr & \cellcolor{green!30} Wahr & \cellcolor{green!30} Wahr & \cellcolor{green!30} Wahr & \cellcolor{orange!30} Falsch \\ +\hline +\cellcolor{green!30} Wahr & \cellcolor{orange!30} Falsch & \cellcolor{orange!30} Falsch & \cellcolor{green!30} Wahr & \cellcolor{orange!30} Falsch \\ +\hline +\cellcolor{orange!30} Falsch & \cellcolor{green!30} Wahr & \cellcolor{orange!30} Falsch & \cellcolor{green!30} Wahr & \cellcolor{green!30} Wahr \\ +\hline +\cellcolor{orange!30} Falsch & \cellcolor{orange!30} Falsch & \cellcolor{orange!30} Falsch & \cellcolor{orange!30} Falsch & \cellcolor{green!30} Wahr \\ +\end{tabulary} +\end{center} + +\end{document} diff --git a/Info/11/MUG_SWG_SG/1/GrundlagenAB/img/and_block.png b/Info/11/MUG_SWG_SG/1/GrundlagenAB/img/and_block.png new file mode 120000 index 00000000..93d69b34 --- /dev/null +++ b/Info/11/MUG_SWG_SG/1/GrundlagenAB/img/and_block.png @@ -0,0 +1 @@ +../../LogischeOperationen/img/and_block.png
\ No newline at end of file diff --git a/Info/11/MUG_SWG_SG/1/GrundlagenAB/img/for_block.png b/Info/11/MUG_SWG_SG/1/GrundlagenAB/img/for_block.png Binary files differnew file mode 100644 index 00000000..84f00606 --- /dev/null +++ b/Info/11/MUG_SWG_SG/1/GrundlagenAB/img/for_block.png diff --git a/Info/11/MUG_SWG_SG/1/GrundlagenAB/img/if_block.png b/Info/11/MUG_SWG_SG/1/GrundlagenAB/img/if_block.png new file mode 120000 index 00000000..95cdc7fb --- /dev/null +++ b/Info/11/MUG_SWG_SG/1/GrundlagenAB/img/if_block.png @@ -0,0 +1 @@ +../../Bedingte_Anweisungen/img/if_block.png
\ No newline at end of file diff --git a/Info/11/MUG_SWG_SG/1/GrundlagenAB/img/if_else_block.png b/Info/11/MUG_SWG_SG/1/GrundlagenAB/img/if_else_block.png new file mode 120000 index 00000000..1be76861 --- /dev/null +++ b/Info/11/MUG_SWG_SG/1/GrundlagenAB/img/if_else_block.png @@ -0,0 +1 @@ +../../Bedingte_Anweisungen/img/if_else_block.png
\ No newline at end of file diff --git a/Info/11/MUG_SWG_SG/1/GrundlagenAB/img/not_block.png b/Info/11/MUG_SWG_SG/1/GrundlagenAB/img/not_block.png new file mode 120000 index 00000000..cea91736 --- /dev/null +++ b/Info/11/MUG_SWG_SG/1/GrundlagenAB/img/not_block.png @@ -0,0 +1 @@ +../../LogischeOperationen/img/not_block.png
\ No newline at end of file diff --git a/Info/11/MUG_SWG_SG/1/GrundlagenAB/img/or_block.png b/Info/11/MUG_SWG_SG/1/GrundlagenAB/img/or_block.png new file mode 120000 index 00000000..d0c10631 --- /dev/null +++ b/Info/11/MUG_SWG_SG/1/GrundlagenAB/img/or_block.png @@ -0,0 +1 @@ +../../LogischeOperationen/img/or_block.png
\ No newline at end of file diff --git a/Info/11/MUG_SWG_SG/1/GrundlagenAB/img/repeat_block.png b/Info/11/MUG_SWG_SG/1/GrundlagenAB/img/repeat_block.png new file mode 120000 index 00000000..37492389 --- /dev/null +++ b/Info/11/MUG_SWG_SG/1/GrundlagenAB/img/repeat_block.png @@ -0,0 +1 @@ +../../Wiederholungen_Variablen/img/repeat_block.png
\ No newline at end of file diff --git a/Info/11/MUG_SWG_SG/1/GrundlagenAB/img/repeat_n_block.png b/Info/11/MUG_SWG_SG/1/GrundlagenAB/img/repeat_n_block.png new file mode 120000 index 00000000..2ae267d2 --- /dev/null +++ b/Info/11/MUG_SWG_SG/1/GrundlagenAB/img/repeat_n_block.png @@ -0,0 +1 @@ +../../Wiederholungen_Variablen/img/repeat_n_block.png
\ No newline at end of file diff --git a/Info/11/MUG_SWG_SG/1/GrundlagenAB/img/repeat_until_block.png b/Info/11/MUG_SWG_SG/1/GrundlagenAB/img/repeat_until_block.png new file mode 120000 index 00000000..34459b6e --- /dev/null +++ b/Info/11/MUG_SWG_SG/1/GrundlagenAB/img/repeat_until_block.png @@ -0,0 +1 @@ +../../Wiederholungen_Variablen/img/repeat_until_block.png
\ No newline at end of file diff --git a/Info/11/MUG_SWG_SG/1/GrundlagenAB/img/variables_as_boxes.png b/Info/11/MUG_SWG_SG/1/GrundlagenAB/img/variables_as_boxes.png new file mode 120000 index 00000000..92510eb4 --- /dev/null +++ b/Info/11/MUG_SWG_SG/1/GrundlagenAB/img/variables_as_boxes.png @@ -0,0 +1 @@ +../../Wiederholungen_Variablen/img/variables_as_boxes.png
\ No newline at end of file |
