You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit ba230cb
Browse filesBrowse the repository at this point in the historyBrowse files
Web 0.13.10: PAP selbst bauen in Lektion 1 (Kuchen backen), Begriff flowchart (#206)
* Web 0.13.8: Schleife in Lektion 1 als gekipptes L
Statt „Klammer links“ heißt die Schleifenform im Struktogramm jetzt
„gekipptes L“ (en upside-down L, pt L invertido), im Text, im Vergleich
und im Wissenstest.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ugz28UN7HvRoMmJHmaecJn
* Web 0.13.9: PAP in Lektion 1 ausführlicher, Nachteile mit GOTO
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ugz28U3kz1Gn6VpW4ZHqDH
* Web 0.13.10: PAP selbst bauen in Lektion 1 (Kuchen backen), Begriff flowchart
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ugz28U3kz1Gn6VpW4ZHqDH
---------
Co-authored-by: Claude <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,7 @@ The format is loosely inspired by Keep a Changelog.
8
8
9
9
### Added
10
10
11
+
-**Web 0.13.10, build a flowchart yourself in lesson 1:** new lesson block `::: pap` („PAP bauen“): a flowchart with empty dashed places and the finished, labelled elements shuffled below; tap an element and then its place, or drag it there (mouse, pen, finger). „Prüfen“ marks right and wrong places, after a wrong try „Lösung zeigen“. Lesson 1 gets the new step „Übung: Kuchen backen als PAP“ (Ludwig bakes a cake: two loops, one output). Lesson 1 now introduces the English word **flowchart** for the PAP right at the start, and the quiz asks for it (de, pt).
11
12
-**Web 0.13.9, flowchart in lesson 1 explained in more detail:** the old step „Andere Darstellungen: PAP und Pseudocode“ is now three steps. „Andere Darstellungen: Der PAP“ shows the tea Struktogramm again, then the same algorithm as PAP, its symbols and advantages (easy to read, flowcharts are used outside programming too). „Nachteile des PAP: Sprünge“ shows the tea example as a program with line numbers and GOTO, what goes wrong when one line is inserted, jumps out of loops and spaghetti code (Dijkstra moved here). „Pseudocode und Vergleich“ keeps pseudocode and the comparison. New checklist lines and a quiz question on GOTO; de/en/pt.
12
13
-**Web 0.13.8, loop in lesson 1 is a „gekipptes L“:** lesson 1 no longer calls the loop shape in the Struktogramm a „Klammer links“ but a „gekipptes L“ (condition on top, strip on the left), in the text, the comparison and the quiz (en „upside-down L“, pt „L invertido“).
13
14
-**Web 0.13.7, statements without class are coloured too:** when Programmieren shows the code without `class` and `main` (e.g. „Aufstehen;“, „Zähne putzen;“ in lesson 1), the statements now sit in a yellow block like a method, matching the yellow statements in the Struktogramm; loops and branches inside keep their own colours. Statements are now always yellow, also inside a loop or branch (own yellow stripe in the code, yellow box in the Struktogramm and in lesson 1); only the empty ø takes the colour of its block. A loop with pseudocode condition (`while (Tee noch zu heiß) {`) is coloured up to its closing brace.
Copy file name to clipboardExpand all lines: web/lessons/de/01-was-ist-ein-struktogramm.md
+32-3Lines changed: 32 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ Die Darstellung stammt von **Isaac Nassi und Ben Shneiderman** (1973). Deshalb h
24
24
Links Isaac „Ike“ Nassi (Foto: [Ed Schipul](https://commons.wikimedia.org/wiki/File:Me_with_Ike_Nassi!!!!!_%286893328729%29.jpg), [CC BY 2.0](https://creativecommons.org/licenses/by/2.0/deed.de), zugeschnitten), rechts Ben Shneiderman (Foto: [Robert Kosara](https://commons.wikimedia.org/wiki/File:Ben_Shneiderman_at_UNCC_%283x4_cropped%29.jpg), CC0).
25
25
:::
26
26
27
-
> Ein Struktogramm hat immer genau einen Anfang (oben) und ein Ende (unten). Es gibt keine Pfeile und keine Sprünge kreuz und quer. Programme, die kreuz und quer springen, nennt man **Spaghetticode**, weil sich ihr Ablauf verheddert wie Nudeln auf dem Teller. Mehr dazu in Schritt 8.
27
+
> Ein Struktogramm hat immer genau einen Anfang (oben) und ein Ende (unten). Es gibt keine Pfeile und keine Sprünge kreuz und quer. Programme, die kreuz und quer springen, nennt man **Spaghetticode**, weil sich ihr Ablauf verheddert wie Nudeln auf dem Teller. Mehr dazu in Schritt 9.
28
28
29
29
::: angeberwissen
30
30
Määäh, aufgepasst! 1972 waren Nassi und Shneiderman noch Doktoranden an der Stony Brook University bei New York, Shneiderman etwa 25 und Nassi etwa 23. Also quasi zwei Studis, die nebenbei Informatikgeschichte geschrieben haben.
@@ -104,7 +104,7 @@ Trostpflaster für alle mit einer verpatzten Arbeit: Die berühmte Fachzeitschri
104
104
105
105
## Andere Darstellungen: Der PAP
106
106
107
-
Es gibt noch zwei weitere Arten, Algorithmen darzustellen: den **Programmablaufplan**, kurz **PAP**, und den **Pseudocode**. Beide wirst du im Unterricht treffen.
107
+
Es gibt noch zwei weitere Arten, Algorithmen darzustellen: den **Programmablaufplan**, kurz **PAP**, und den **Pseudocode**. Beide wirst du im Unterricht treffen. Auf Englisch heißt der PAP **flowchart**, auf Deutsch auch Flussdiagramm. Das englische Wort begegnet dir oft, zum Beispiel in Programmen und im Internet.
108
108
109
109
Hier siehst du noch einmal unser Struktogramm zum Teetrinken aus „Alle drei zusammen“. Als Nächstes schauen wir uns den PAP an, und zwar mit demselben Beispiel.
110
110
@@ -133,7 +133,29 @@ Eine Schleife hat im PAP kein eigenes Symbol. Du erkennst sie daran, dass ein Pf
133
133
### Die Vorteile
134
134
135
135
-**Sehr gut lesbar**, auch für Leute, die noch nie einen PAP gesehen haben. Man folgt einfach den Pfeilen mit dem Finger.
136
-
- Solche Pläne heißen allgemein **Flussdiagramm**, auf Englisch *flowchart*. Man benutzt sie nicht nur beim Programmieren, sondern überall, wo ein Ablauf erklärt wird: in Bedienungsanleitungen, bei der Fehlersuche („Leuchtet die Lampe? Nein: Steckt der Stecker?“) oder in Firmen für Arbeitsabläufe.
136
+
- Flussdiagramme benutzt man nicht nur beim Programmieren, sondern überall, wo ein Ablauf erklärt wird: in Bedienungsanleitungen, bei der Fehlersuche („Leuchtet die Lampe? Nein: Steckt der Stecker?“) oder in Firmen für Arbeitsabläufe.
137
+
138
+
## Übung: Kuchen backen als PAP
139
+
140
+
Jetzt baust du selbst einen PAP. Ludwig backt einen Kuchen und geht so vor:
141
+
142
+
Er gibt die Zutaten in die Schüssel und rührt den Teig. Ist der Teig noch nicht glatt, rührt er weiter. Ist er glatt, füllt er den Teig in die Form und backt den Kuchen 30 Minuten. Dann prüft er mit einem Holzstäbchen: Klebt noch Teig daran, backt er 5 Minuten weiter und prüft noch einmal. Ist das Stäbchen sauber, nimmt er den Kuchen heraus und ruft: „Der Kuchen ist fertig!“
143
+
144
+
::: pap
145
+
titel: Übung: Kuchen backen als PAP
146
+
auftrag: Die Plätze im Plan sind leer. Lege jedes Element an seinen Platz. Die Form des Platzes hilft dir.
erklärung: Zwei Schleifen, zwei Pfeile zurück nach oben: Beim Rühren führt der Pfeil zurück zu „Teig rühren“, beim Backen von „5 Minuten weiterbacken“ zurück zur Frage. Die Ausgabe steht im Parallelogramm.
158
+
:::
137
159
138
160
## Nachteile des PAP: Sprünge
139
161
@@ -270,6 +292,7 @@ richtig: Verzweigung
270
292
- Ich kenne die drei Grundbausteine Sequenz, Verzweigung und Wiederholung. → Baustein 1: Die Sequenz
271
293
- Ich erkenne jeden Baustein im Struktogramm an seiner Form. → Alle drei zusammen
272
294
- Ich kenne die Elemente eines PAP und kann einen einfachen PAP lesen. → Andere Darstellungen: Der PAP
295
+
- Ich kann einen einfachen Algorithmus selbst als PAP zusammenbauen. → Übung: Kuchen backen als PAP
273
296
- Ich kann erklären, warum Sprünge mit GOTO zu Fehlern und Spaghetticode führen. → Nachteile des PAP: Sprünge
274
297
- Ich kann einen einfachen Algorithmus auch als Pseudocode lesen. → Pseudocode und Vergleich
275
298
:::
@@ -321,6 +344,12 @@ richtig: Verzweigung
321
344
= Parallelogramm -> Ein- oder Ausgabe
322
345
> Die Raute hat zwei Ausgänge: ja und nein.
323
346
347
+
? Wie heißt der Programmablaufplan auf Englisch?
348
+
-[x] Flowchart
349
+
-[ ] Structure chart
350
+
-[ ] Pseudocode
351
+
> Auf Deutsch sagt man auch Flussdiagramm. Structure chart ist das Struktogramm.
352
+
324
353
? Du fügst in ein Programm mit GOTO eine neue Zeile ein. Was kann passieren?
325
354
-[x] Die Sprünge zeigen auf die falschen Zeilen, weil sich die Nummern verschoben haben
326
355
-[ ] Nichts, die Sprünge passen sich von selbst an
Copy file name to clipboardExpand all lines: web/lessons/en/01-was-ist-ein-struktogramm.md
+24-1Lines changed: 24 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ This way of drawing was invented by **Isaac Nassi and Ben Shneiderman** (1973).
24
24
Left: Isaac “Ike” Nassi (photo: [Ed Schipul](https://commons.wikimedia.org/wiki/File:Me_with_Ike_Nassi!!!!!_%286893328729%29.jpg), [CC BY 2.0](https://creativecommons.org/licenses/by/2.0/), cropped), right: Ben Shneiderman (photo: [Robert Kosara](https://commons.wikimedia.org/wiki/File:Ben_Shneiderman_at_UNCC_%283x4_cropped%29.jpg), CC0).
25
25
:::
26
26
27
-
> A structure chart always has exactly one start (at the top) and one end (at the bottom). There are no arrows and no jumps all over the place. Programs that jump all over the place are called **spaghetti code**, because their flow gets tangled like noodles on a plate. More on this in step 8.
27
+
> A structure chart always has exactly one start (at the top) and one end (at the bottom). There are no arrows and no jumps all over the place. Programs that jump all over the place are called **spaghetti code**, because their flow gets tangled like noodles on a plate. More on this in step 9.
28
28
29
29
::: angeberwissen
30
30
Baaah, listen up! In 1972 Nassi and Shneiderman were still PhD students at Stony Brook University near New York. Shneiderman was about 25 and Nassi about 23. So basically two students who wrote computer science history on the side.
@@ -135,6 +135,28 @@ A loop has no symbol of its own in a flowchart. You recognise it by an arrow tha
135
135
-**Very easy to read**, even for people who have never seen a flowchart. You simply follow the arrows with your finger.
136
136
- Flowcharts are not only used in programming but wherever a process is explained: in user manuals, for troubleshooting (“Is the lamp on? No: is it plugged in?”) or in companies for work processes.
137
137
138
+
## Exercise: Baking a cake as a flowchart
139
+
140
+
Now you build a flowchart yourself. Ludwig bakes a cake like this:
141
+
142
+
He puts the ingredients in the bowl and stirs the batter. If the batter is not smooth yet, he keeps stirring. Once it is smooth, he pours the batter into the tin and bakes the cake for 30 minutes. Then he checks with a wooden skewer: if batter still sticks to it, he bakes for 5 more minutes and checks again. Once the skewer comes out clean, he takes the cake out and calls: “The cake is ready!”
143
+
144
+
::: pap
145
+
titel: Exercise: Baking a cake as a flowchart
146
+
auftrag: The places in the chart are empty. Put each element in its place. The shape of the place helps you.
147
+
start: Start
148
+
anweisung: Put ingredients in the bowl
149
+
anweisung: Stir the batter
150
+
frage: Batter smooth? | nein -> Stir the batter
151
+
anweisung: Pour batter into the tin
152
+
anweisung: Bake for 30 minutes
153
+
frage: Skewer clean? | nein: Bake 5 more minutes
154
+
anweisung: Take the cake out
155
+
ausgabe: “The cake is ready!”
156
+
ende: End
157
+
erklärung: Two loops, two arrows back up: when stirring, the arrow leads back to “Stir the batter”; when baking, it leads from “Bake 5 more minutes” back to the question. The output sits in the parallelogram.
158
+
:::
159
+
138
160
## Drawbacks of the flowchart: jumps
139
161
140
162
An arrow in a flowchart may lead from any symbol to any other. That sounds handy, but it is dangerous.
@@ -270,6 +292,7 @@ richtig: branch
270
292
- I know the three basic building blocks: sequence, branch and loop. → Building block 1: the sequence
271
293
- I can recognise every building block in a structure chart by its shape. → All three together
272
294
- I know the symbols of a flowchart and can read a simple flowchart. → Other ways to draw it: the flowchart
295
+
- I can build a simple algorithm as a flowchart myself. → Exercise: Baking a cake as a flowchart
273
296
- I can explain why jumps with GOTO lead to mistakes and spaghetti code. → Drawbacks of the flowchart: jumps
274
297
- I can also read a simple algorithm as pseudocode. → Pseudocode and comparison
Copy file name to clipboardExpand all lines: web/lessons/pt/01-was-ist-ein-struktogramm.md
+32-3Lines changed: 32 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ Esta forma de desenhar foi inventada por **Isaac Nassi e Ben Shneiderman** (1973
24
24
À esquerda: Isaac “Ike” Nassi (foto: [Ed Schipul](https://commons.wikimedia.org/wiki/File:Me_with_Ike_Nassi!!!!!_%286893328729%29.jpg), [CC BY 2.0](https://creativecommons.org/licenses/by/2.0/), recortada), à direita: Ben Shneiderman (foto: [Robert Kosara](https://commons.wikimedia.org/wiki/File:Ben_Shneiderman_at_UNCC_%283x4_cropped%29.jpg), CC0).
25
25
:::
26
26
27
-
> Um estrutograma tem sempre exatamente um início (em cima) e um fim (em baixo). Não há setas nem saltos para todo o lado. Programas que saltam para todo o lado chamam-se **código esparguete**, porque o seu fluxo se enrola como massa no prato. Mais sobre isto no passo 8.
27
+
> Um estrutograma tem sempre exatamente um início (em cima) e um fim (em baixo). Não há setas nem saltos para todo o lado. Programas que saltam para todo o lado chamam-se **código esparguete**, porque o seu fluxo se enrola como massa no prato. Mais sobre isto no passo 9.
28
28
29
29
::: angeberwissen
30
30
Méééé, ouve bem! Em 1972, Nassi e Shneiderman ainda eram doutorandos na Universidade de Stony Brook, perto de Nova Iorque. Shneiderman tinha uns 25 anos e Nassi uns 23. Ou seja, dois estudantes que escreveram história da informática nas horas vagas.
@@ -104,7 +104,7 @@ Consolo para quem correu mal um teste: a famosa revista *Communications of the A
104
104
105
105
## Outras formas de desenhar: o fluxograma
106
106
107
-
Há mais duas formas de representar um algoritmo: o **fluxograma** e o **pseudocódigo**. Vais conhecer as duas nas aulas.
107
+
Há mais duas formas de representar um algoritmo: o **fluxograma** e o **pseudocódigo**. Vais conhecer as duas nas aulas. Em inglês, o fluxograma chama-se **flowchart**. Esta palavra aparece muitas vezes, por exemplo em programas e na internet.
108
108
109
109
Aqui vês outra vez o nosso estrutograma para beber chá de “Os três juntos”. A seguir vamos ver o fluxograma, com o mesmo exemplo.
110
110
@@ -133,7 +133,29 @@ Um ciclo não tem símbolo próprio no fluxograma. Reconheces um ciclo por uma s
133
133
### As vantagens
134
134
135
135
-**Muito fácil de ler**, mesmo para quem nunca viu um fluxograma. Basta seguir as setas com o dedo.
136
-
- Os fluxogramas (em inglês *flowchart*) não se usam só na programação, mas em todo o lado onde se explica um processo: em manuais de instruções, na procura de avarias (“A lâmpada acende? Não: a ficha está ligada?”) ou nas empresas para os processos de trabalho.
136
+
- Os fluxogramas não se usam só na programação, mas em todo o lado onde se explica um processo: em manuais de instruções, na procura de avarias (“A lâmpada acende? Não: a ficha está ligada?”) ou nas empresas para os processos de trabalho.
137
+
138
+
## Exercício: Fazer um bolo como fluxograma
139
+
140
+
Agora és tu que constróis um fluxograma. O Ludwig faz um bolo assim:
141
+
142
+
Põe os ingredientes na tigela e mexe a massa. Se a massa ainda não estiver lisa, continua a mexer. Quando está lisa, deita a massa na forma e coze o bolo durante 30 minutos. Depois testa com um palito: se ainda tiver massa agarrada, coze mais 5 minutos e testa outra vez. Quando o palito sai limpo, tira o bolo e diz: “O bolo está pronto!”
143
+
144
+
::: pap
145
+
titel: Exercício: Fazer um bolo como fluxograma
146
+
auftrag: Os lugares no fluxograma estão vazios. Põe cada elemento no seu lugar. A forma do lugar ajuda-te.
147
+
start: Início
148
+
anweisung: Pôr os ingredientes na tigela
149
+
anweisung: Mexer a massa
150
+
frage: Massa lisa? | nein -> Mexer a massa
151
+
anweisung: Deitar a massa na forma
152
+
anweisung: Cozer 30 minutos
153
+
frage: Palito limpo? | nein: Cozer mais 5 minutos
154
+
anweisung: Tirar o bolo do forno
155
+
ausgabe: “O bolo está pronto!”
156
+
ende: Fim
157
+
erklärung: Dois ciclos, duas setas para cima: ao mexer, a seta volta a “Mexer a massa”; ao cozer, vai de “Cozer mais 5 minutos” de volta à pergunta. A saída fica no paralelogramo.
158
+
:::
137
159
138
160
## Desvantagens do fluxograma: saltos
139
161
@@ -270,6 +292,7 @@ richtig: decisão
270
292
- Conheço os três blocos básicos: sequência, decisão e ciclo. → Bloco básico 1: a sequência
271
293
- Reconheço cada bloco básico num estrutograma pela sua forma. → Os três juntos
272
294
- Conheço os símbolos de um fluxograma e sei ler um fluxograma simples. → Outras formas de desenhar: o fluxograma
295
+
- Sei construir sozinho um algoritmo simples como fluxograma. → Exercício: Fazer um bolo como fluxograma
273
296
- Sei explicar porque é que os saltos com GOTO levam a erros e a código esparguete. → Desvantagens do fluxograma: saltos
274
297
- Também consigo ler um algoritmo simples em pseudocódigo. → Pseudocódigo e comparação
275
298
:::
@@ -321,6 +344,12 @@ richtig: decisão
321
344
= Paralelogramo -> Entrada ou saída
322
345
> O losango tem duas saídas: sim e não.
323
346
347
+
? Como se diz fluxograma em inglês?
348
+
-[x] Flowchart
349
+
-[ ] Structure chart
350
+
-[ ] Pseudocode
351
+
> Structure chart é o estrutograma.
352
+
324
353
? Acrescentas uma nova linha a um programa com GOTO. O que pode acontecer?
325
354
-[x] Os saltos apontam para as linhas erradas, porque os números mudaram
"web_learn_pap_hint" = "Tippe ein Element unten an und dann seinen Platz im Plan. Du kannst es auch hinziehen. Ein belegter Platz gibt sein Element beim Antippen zurück.";
105
+
"web_learn_pap_score_fmt" = "%d von %d Elementen richtig";
106
+
"web_learn_pap_all_right" = "Alles richtig! Dein PAP ist fertig.";
107
+
"web_learn_pap_missing_fmt" = "Es fehlen noch %d Elemente.";
108
+
"web_learn_pap_empty" = "Leerer Platz";
109
+
"web_learn_pap_yes" = "ja";
110
+
"web_learn_pap_no" = "nein";
104
111
"web_learn_review" = "Nachlesen";
105
112
"web_learn_terms" = "Fachbegriffe";
106
113
"web_learn_resize" = "Breite des Lernbereichs ändern (Doppelklick: zurücksetzen)";
Copy file name to clipboardExpand all lines: web/src/i18n/en.strings
+7Lines changed: 7 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -101,6 +101,13 @@
101
101
"web_learn_cloze_all_right" = "All gaps correct!";
102
102
"web_learn_cloze_solution" = "Show solution";
103
103
"web_learn_cloze_again" = "Try again";
104
+
"web_learn_pap_hint" = "Tap an element below and then its place in the chart. You can also drag it there. Tapping a filled place gives its element back.";
105
+
"web_learn_pap_score_fmt" = "%d of %d elements correct";
106
+
"web_learn_pap_all_right" = "All correct! Your flowchart is finished.";
107
+
"web_learn_pap_missing_fmt" = "%d elements are still missing.";
108
+
"web_learn_pap_empty" = "Empty place";
109
+
"web_learn_pap_yes" = "yes";
110
+
"web_learn_pap_no" = "no";
104
111
"web_learn_review" = "Review";
105
112
"web_learn_terms" = "Technical terms";
106
113
"web_learn_resize" = "Change the width of the learning area (double-click: reset)";
0 commit comments