Beispiele und Musterlösungen
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

rotating_square.py 329B

2 months ago
123456789101112131415
  1. from turtle import Turtle
  2. def draw_square(turtle, length):
  3. for _ in range(4):
  4. turtle.forward(length)
  5. turtle.right(90)
  6. def draw_mandala(turtle, length):
  7. for _ in range(18):
  8. draw_square(turtle, length)
  9. turtle.right(20)
  10. sophia = Turtle()
  11. draw_mandala(sophia, 100)
  12. sophia.screen.mainloop()