Advertisement
ZEdKasat

Trial Code

Jan 18th, 2022
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.47 KB | None | 0 0
  1. from turtle import *
  2.  
  3. tom = Turtle()
  4. ##Polygon
  5. sides = 7
  6. polygon = 360/sides
  7. star = 180-(180/sides)
  8.  
  9. for z in range(sides):
  10.   tom.forward(100)
  11.   tom.left(star)
  12.  
  13. tom.color("red")
  14. tom.pensize(3)
  15.  
  16. ##Circle
  17. r = 30
  18. for x in range(6):
  19.   tom.circle(r)
  20.   r = r + 20
  21.   tom.right(180)
  22.  
  23.  
  24.  
  25. ## Spiral
  26. sides = 7
  27. polygon = 360/sides
  28. star = 180-(180/sides)
  29.  
  30. length = 10
  31. for z in range(sides*7):
  32.   tom.forward(length)
  33.   tom.left(star)
  34.   length = length + 5
  35.  
  36.  
  37. done()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement