Advertisement
Guest User

Untitled

a guest
Apr 7th, 2020
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.41 KB | None | 0 0
  1. import turtle
  2.  
  3. def polygon():
  4.     for i in range(x):
  5.         turtle.forward(y)
  6.         turtle.left(360 / x)
  7.  
  8. turtle.shape('turtle')
  9. x = 3
  10. r = 28.867513459481
  11. y = r * (2 * sin(pi / x))
  12.  
  13. for i in range(10):
  14.     polygon()
  15.     turtle.right(360 / x + 0.5 * (180 - 360 / x))
  16.     turtle.penup()
  17.     turtle.forward(10)
  18.     turtle.pendown()
  19.     turtle.left(360 / x + 0.5 * (180 - 360 / x))
  20.     x += 1
  21.     r += 10
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement