Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
lehrkraefte:snr:informatik:bruehl-2022 [2022/04/04 17:38] Olaf Schnürer [Klasse 1a: Prüfung] |
lehrkraefte:snr:informatik:bruehl-2022 [2022/04/10 15:27] (current) Olaf Schnürer [1. Doppellektion (ca. 14. bzw. 15. Februar 2022)] |
||
---|---|---|---|
Line 1: | Line 1: | ||
~~NOTOC~~ | ~~NOTOC~~ | ||
- | ====== Klasse 1a: Prüfung ====== | ||
- | - [[lehrkraefte: | ||
- | |||
- | Nach der Prüfung: | ||
- | |||
- | * [[|Feedback zur gesamten Lerneinheit]] | ||
- | * Rekursion: Pflanze und Sierpinski-Dreieck | ||
====== Informatik: Algorithmen und Programme (1AFGsK und 1CFP) ====== | ====== Informatik: Algorithmen und Programme (1AFGsK und 1CFP) ====== | ||
Line 15: | Line 8: | ||
* Vorstellung und Organisatorisches (Prüfung, Hausaufgaben: | * Vorstellung und Organisatorisches (Prüfung, Hausaufgaben: | ||
* <wrap hi>Setze eine Bookmark auf die aktuelle Seite!</ | * <wrap hi>Setze eine Bookmark auf die aktuelle Seite!</ | ||
- | * [[lehrkraefte: | + | * [[lehrkraefte: |
===== 2. Doppellektion (ca. 21. bzw. 22. Februar 2022) ===== | ===== 2. Doppellektion (ca. 21. bzw. 22. Februar 2022) ===== | ||
Line 72: | Line 65: | ||
</ | </ | ||
===== 7. Doppellektion (ca. 04. bzw. 05. April 2022) ===== | ===== 7. Doppellektion (ca. 04. bzw. 05. April 2022) ===== | ||
- | * erste Doppellektion: | + | * Prüfung |
- | * zweite Doppellektion: | + | * Feedback |
+ | * Erste Begegnung mit Rekursion | ||
+ | <hidden Schrittweise Hinführung zur Rekursion: Zuerst ast0, dann ast1, ast2> | ||
+ | <code python> | ||
+ | from gturtle import * | ||
+ | |||
+ | def ast0(s): | ||
+ | forward(s) | ||
+ | backward(s) | ||
+ | |||
+ | def ast1(s): | ||
+ | forward(s) | ||
+ | left(winkel) | ||
+ | ast0(s/2) | ||
+ | right(winkel) | ||
+ | ast0(s/2) | ||
+ | right(winkel) | ||
+ | ast0(s/2) | ||
+ | left(winkel) | ||
+ | backward(s) | ||
+ | |||
+ | |||
+ | def ast2(s): | ||
+ | forward(s) | ||
+ | left(winkel) | ||
+ | ast1(s/2) | ||
+ | right(winkel) | ||
+ | ast1(s/2) | ||
+ | right(winkel) | ||
+ | ast1(s/2) | ||
+ | left(winkel) | ||
+ | backward(s) | ||
+ | |||
+ | winkel = 25 | ||
+ | # Nette andere Winkel: 120, 60, 90 | ||
+ | makeTurtle() | ||
+ | backward(300) | ||
+ | ast2(300) | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | <hidden ... und nun rekursiv (also ast(X,s) statt astX(s)) ... und dann gleich animiert> | ||
+ | <code python> | ||
+ | from gturtle import * | ||
+ | |||
+ | def ast(t, s): | ||
+ | if t == 0: | ||
+ | forward(s) | ||
+ | backward(s) | ||
+ | else: | ||
+ | forward(s) | ||
+ | left(winkel) | ||
+ | ast(t - 1, s/2) | ||
+ | right(winkel) | ||
+ | ast(t - 1, s/2) | ||
+ | right(winkel) | ||
+ | ast(t - 1, s/2) | ||
+ | left(winkel) | ||
+ | backward(s) | ||
+ | |||
+ | makeTurtle() | ||
+ | hideTurtle() | ||
+ | backward(300) | ||
+ | |||
+ | enableRepaint(False) | ||
+ | winkel = 0 | ||
+ | while winkel <= 120: | ||
+ | clear() | ||
+ | ast(9, 300) | ||
+ | repaint() | ||
+ | winkel = winkel + 1 | ||
+ | delay(50) | ||
+ | </ | ||
+ | </ | ||
===== Organisatorisches zur Prüfung ===== | ===== Organisatorisches zur Prüfung ===== | ||