Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen der Seite angezeigt.
Beide Seiten, vorherige Überarbeitung Vorherige Überarbeitung Nächste Überarbeitung | Vorherige Überarbeitung | ||
gf_informatik:microbit_und_roboter_programmieren:aufgaben_hof [2025-09-09 14:10] – [Aufgabe E3] hof | gf_informatik:microbit_und_roboter_programmieren:aufgaben_hof [2025-09-23 12:14] (aktuell) – hof | ||
---|---|---|---|
Zeile 542: | Zeile 542: | ||
for y in range(5): | for y in range(5): | ||
if x < 4: | if x < 4: | ||
+ | # Copy value from next column, such that the columns | ||
+ | # scroll from right to left side of display. | ||
display.set_pixel(x, | display.set_pixel(x, | ||
elif 4-y < leds: | elif 4-y < leds: | ||
+ | # In the rightmost column, draw the bar for the current | ||
+ | # volume. | ||
display.set_pixel(x, | display.set_pixel(x, | ||
elif 4-y == leds: | elif 4-y == leds: | ||
+ | # Top non-dark pixel of the bar is dimmed according to fractional | ||
+ | # volume. | ||
display.set_pixel(x, | display.set_pixel(x, | ||
else: | else: | ||
+ | # The top pixels of the last column are black (cleared) | ||
display.set_pixel(x, | display.set_pixel(x, | ||
Zeile 681: | Zeile 688: | ||
In einer früheren Aufgabe hast du Schere-Stein-Papier bereits einmal programmiert. Programmiere es nun so (um), dass die beiden Spieler: | In einer früheren Aufgabe hast du Schere-Stein-Papier bereits einmal programmiert. Programmiere es nun so (um), dass die beiden Spieler: | ||
- | < | + | < |
++++Lösungen Aufgaben F| | ++++Lösungen Aufgaben F| | ||
=== F1 === | === F1 === | ||
Zeile 887: | Zeile 894: | ||
* Button B: fährt nach rechts (wenn Touch Logo gleichzeitig gedrückt) | * Button B: fährt nach rechts (wenn Touch Logo gleichzeitig gedrückt) | ||
- | < | + | < |
++++Lösungen| | ++++Lösungen| | ||
=== G1 === | === G1 === |