Wir zeichnen ein Auto mit turtle.

app.py 740B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. import time
  2. import turtle as t
  3. t.reset()
  4. for i in range (1):
  5. t.forward(40)
  6. time.sleep(1)
  7. t.right(90)
  8. time.sleep(1)
  9. t.forward(20)
  10. time.sleep(1)
  11. t.left(90)
  12. time.sleep(1)
  13. t.forward(20)
  14. time.sleep(1)
  15. t.right(90)
  16. time.sleep(1)
  17. t.forward(40)
  18. time.sleep(1)
  19. t.right(90)
  20. time.sleep(1)
  21. t.forward(10)
  22. time.sleep(1)
  23. t.circle(20)
  24. time.sleep(1)
  25. t.forward(60)
  26. time.sleep(1)
  27. t.circle(20)
  28. time.sleep(1)
  29. t.forward(10)
  30. time.sleep(1)
  31. t.right(90)
  32. time.sleep(1)
  33. t.forward(40)
  34. time.sleep(1)
  35. t.left(90)
  36. time.sleep(1)
  37. t.back(20)
  38. time.sleep(1)
  39. t.right(90)
  40. time.sleep(1)
  41. t.forward(20)
  42. time.sleep(1)
  43. t.left(90)