Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. #!/bin/python3
  2. from turtle import *
  3. from random import randint
  4. speed(0)
  5. penup()
  6. goto(-140,140)
  7. for step in range(15):
  8. write(step, align='center')
  9. right(90)
  10. forward(10)
  11. pendown()
  12. forward(150)
  13. penup()
  14. backward(160)
  15. left(90)
  16. forward(20)
  17.  
  18. ada = Turtle()
  19. ada.color('red')
  20. ada.shape('turtle')
  21.  
  22. ada.penup()
  23. ada.goto(0,150)
  24. ada.pendown()
  25.  
  26. bob = Turtle()
  27. bob.color('blue')
  28. bob.shape('turtle')
  29.  
  30. bob.penup()
  31. bob.goto(0,-100)
  32. bob.pendown()
  33.  
  34. georgeta = Turtle()
  35. georgeta.color('yellow')
  36. georgeta.shape('triangle')
  37.  
  38. georgeta.penup()
  39. georgeta.goto(-50,-50)
  40. georgeta.pendown()
  41.  
  42. for turn in range(10000):
  43. ada.right(18)
  44. bob.left(18)
  45. georgeta.right(60)
  46. ada.forward(randint(50,80))
  47. bob.forward(randint(50,80))
  48. georgeta.forward(randint(50,100))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement