Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
lehrkraefte:sbtsnr:python:logic [2022/10/19 17:10] Olaf Schnürer [Funktion Erhoehen war falsch] |
lehrkraefte:sbtsnr:python:logic [2022/11/04 18:21] Olaf Schnürer [... und nun noch etwas rumgesponnen ...] |
||
---|---|---|---|
Line 237: | Line 237: | ||
print(binearMitAbstand + " " + vertikal + f" | print(binearMitAbstand + " " + vertikal + f" | ||
</ | </ | ||
+ | |||
+ | |||
+ | ====== Turtle-Test ====== | ||
+ | |||
+ | <code python> | ||
+ | from turtle import * | ||
+ | speed(0) | ||
+ | shape(" | ||
+ | |||
+ | n = 11 | ||
+ | s = 230 | ||
+ | |||
+ | pencolor(" | ||
+ | pensize(4) | ||
+ | fillcolor(" | ||
+ | |||
+ | a = 300 | ||
+ | penup() | ||
+ | goto(0.7*a, 0.5*a) | ||
+ | pendown() | ||
+ | setheading(90) | ||
+ | pendown() | ||
+ | |||
+ | begin_fill() | ||
+ | for i in range(n): | ||
+ | forward(s) | ||
+ | left(180 - 180/n) | ||
+ | end_fill() | ||
+ | |||
+ | </ | ||
+ |