Skip to content
This repository was archived by the owner on Nov 7, 2026. It is now read-only.

Commit ae3957f

Browse files
Web 0.14.26: Animation in Lektion 14, verschachtelte Schleife füllt Einmaleins (#255)
* Lektion 14: Animation verschachtelte Schleife füllt Einmaleins-Tabelle (i/j) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ugz28YRCDqXzuFbHDaDG3dH * Web 0.14.25: Version und Webseite Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ugz28YRCDqXzuFbHDaDG3dH --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 452c853 commit ae3957f

18 files changed

Lines changed: 1295 additions & 100 deletions

‎CHANGELOG.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ The format is loosely inspired by Keep a Changelog.
88

99
### Changed
1010

11+
- **Web 0.14.26, animation: nested loop fills a times table in lesson 14:** in step „Schleife in der Schleife“, after the triangle example (which keeps the names `zeile`/`stern`), a new sentence says experienced programmers call the counters `i` and `j`, followed by an animated structure chart: the active block lights up, a variables box shows `i`, `j` and `text` (pt `texto`), and the console fills line by line with `1 2 3 4`, `2 4 6 8`, `3 6 9 12`. It shows that `j` starts again at 1 on every new line. Plays once when visible, „Noch einmal abspielen“ replays it (de/en/pt).
1112
- **Web 0.14.25, „Bombe entschärfen“: tap part of a line:** a bomb round can name the wrong part with `stelle:` (e.g. `stelle: i++`). Such rounds show the parts of every line as tappable boxes (the three fields of a `for` header, the condition of `if`/`while`, target and value of an assignment, call and arguments split at `+`); right line but wrong part gives its own hint. Lesson 13 (6 of 8 rounds) and lesson 15 (all 6 rounds) use it (de/en/pt, texts in all 21 languages).
1213
- **Web 0.14.24, animation: while becomes for in lesson 13:** step 2 „Zählen mit festem Plan“ of the for loop lesson shows an animated structure chart: the while loop's start value (`int i = 1`), condition (`i <= 5`) and step (`i++`) light up one after another in their own colour and then move together into the head of the for loop, labelled Start, Bedingung, Schritt (en Init/Condition/Step, pt Início/Condição/Passo). It plays once when it scrolls into view; „Noch einmal abspielen“ replays it. With reduced motion only the end state is shown. New lesson block `::: grafik datei.svg animiert` (own SVG with CSS animation, no library).
1314
- **Web 0.14.23, compact nested branches:** a two-way branch keeps both columns the same width only when neither column contains another branch or switch. Before, each nesting level doubled the width, so the drinks machine in lesson 10 step 2 (three nested branches) was about 3000 px wide and unreadable in the lesson and in the editor; now it is about half as wide, and 20 other lesson diagrams (e.g. VisuBot solutions, L17 ticket) get narrower too. Columns of a branch or switch inside a loop or another branch now always fill the box; before, the header could stay wider than its columns, so the if in lesson 14 step 3 looked like a loop (37 lesson diagrams affected). Wide diagrams in the lesson text no longer shrink below 60 % of their size; they scroll sideways instead.

‎web/lessons/bilder/en/l13-verschachtelt-tabelle.svg‎

Lines changed: 193 additions & 0 deletions
Loading

‎web/lessons/bilder/l13-verschachtelt-tabelle.svg‎

Lines changed: 193 additions & 0 deletions
Loading

‎web/lessons/bilder/pt/l13-verschachtelt-tabelle.svg‎

Lines changed: 193 additions & 0 deletions
Loading

‎web/lessons/de/14-verschachteln.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,12 @@ Die äußere Schleife zählt die Zeilen. Die innere hängt so viele Sterne an de
5656

5757
Mit `String text = ""` beginnt jede Zeile leer. `text = text + "*"` hängt einen Stern an. Erst wenn die Zeile fertig ist, wird sie ausgegeben.
5858

59+
Erfahrene Programmierer nennen die Zählvariablen kurz `i` und `j`: außen `i`, innen `j`. Dann sieht es so aus, hier mit einer kleinen Einmaleins-Tabelle:
60+
61+
::: grafik l13-verschachtelt-tabelle.svg animiert
62+
Die äußere Schleife zählt mit `i` die Zeilen, die innere mit `j` die Zahlen in einer Zeile. Bei jeder neuen Zeile fängt `j` wieder bei 1 an.
63+
:::
64+
5965
## Übung: Rechteck
6066

6167
::: übung l13-rechteck

‎web/lessons/en/14-verschachteln.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,12 @@ The outer loop counts the lines. The inner one adds as many stars to the text as
5656

5757
With `String text = ""` every line starts empty. `text = text + "*"` adds a star. Only when the line is finished is it output.
5858

59+
Experienced programmers give the counter variables the short names `i` and `j`: `i` outside, `j` inside. Then it looks like this, here with a small times table:
60+
61+
::: grafik l13-verschachtelt-tabelle.svg animiert
62+
The outer loop counts the lines with `i`, the inner one counts the numbers in a line with `j`. On every new line, `j` starts again at 1.
63+
:::
64+
5965
## Exercise: Rectangle
6066

6167
::: übung l13-rechteck

‎web/lessons/pt/14-verschachteln.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,12 @@ O ciclo exterior conta as linhas. O interior acrescenta ao texto tantas estrelas
5656

5757
Com `String texto = ""` cada linha começa vazia. `texto = texto + "*"` acrescenta uma estrela. Só quando a linha está pronta é que é mostrada.
5858

59+
Programadores experientes dão às variáveis contadoras os nomes curtos `i` e `j`: `i` por fora, `j` por dentro. Fica assim, aqui com uma pequena tabuada:
60+
61+
::: grafik l13-verschachtelt-tabelle.svg animiert
62+
O ciclo exterior conta as linhas com `i`, o interior conta os números de uma linha com `j`. Em cada nova linha, `j` começa outra vez em 1.
63+
:::
64+
5965
## Exercício: Retângulo
6066

6167
::: übung l13-rechteck

‎web/package-lock.json‎

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎web/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "visustruct-web",
33
"private": true,
4-
"version": "0.14.25",
4+
"version": "0.14.26",
55
"type": "module",
66
"scripts": {
77
"dev": "vite",
Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)