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:ein-und-ausgabe-variablen [2022/02/28 09:21] Olaf Schnürer [Lösungsvorschläge] |
lehrkraefte:snr:informatik:bruehl-2022:ein-und-ausgabe-variablen [2022/03/17 08:13] (current) Olaf Schnürer |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ~~NOTOC~~ | ||
+ | |||
====== Ein- und Ausgabe, Variablen ====== | ====== Ein- und Ausgabe, Variablen ====== | ||
Line 283: | Line 285: | ||
<hidden Spalte kleines Einmaleins> | <hidden Spalte kleines Einmaleins> | ||
<code python> | <code python> | ||
- | WIRD HAUSAUFGABE, | + | x = inputInt(" |
+ | |||
+ | vielfaches = 0 | ||
+ | repeat 10: | ||
+ | vielfaches = vielfaches + x | ||
+ | print(vielfaches) | ||
+ | |||
+ | # Alternative Lösung: | ||
+ | # | ||
+ | # print(" | ||
+ | # i = 0 | ||
+ | # repeat 10: | ||
+ | # i = i + 1 | ||
+ | # | ||
</ | </ | ||
</ | </ | ||
Line 289: | Line 304: | ||
<hidden $n$-Eck> | <hidden $n$-Eck> | ||
<code python> | <code python> | ||
- | einzufuegen | + | from gturtle import * |
+ | makeTurtle() | ||
+ | |||
+ | n = 7 | ||
+ | s = 100 | ||
+ | |||
+ | repeat(n): | ||
+ | forward(s) | ||
+ | right(360/ | ||
</ | </ | ||
</ | </ |