SHARE
TWEET

Untitled

SlavikMIPT Nov 17th, 2019 82 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import turtle
  2. import math
  3.  
  4. n = 3
  5. r = 30
  6. turtle.setheading(0)
  7. turtle.left(150)
  8.  
  9. for y in range(4):
  10.     a = r * 2 * math.sin(360 // 2 * n)
  11.     l = 180 - (180 * (n - 2) // n)
  12.  
  13.     for i in range(n):
  14.         turtle.forward(a)
  15.         turtle.left(l)
  16.     n = n + 1
  17.     r = r + 5
  18.     turtle.penup()
  19.  
  20.  
  21.     turtle.forward(50)
  22.     turtle.pendown()
  23.     turtle.setheading(0)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top