KYO297

Untitled

Apr 14th, 2022
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.31 KB | None | 0 0
  1. import turtle as tt
  2. import math
  3.  
  4.  
  5. def ang(x):
  6.     y = math.atan(math.sin(x)) * (180/math.pi)
  7.     return y
  8.  
  9.  
  10. n = int(1e2)
  11. r = int(float(input())*n*math.pi)
  12. tt.penup()
  13. tt.back(600)
  14. tt.pendown()
  15. an = 0
  16. for i in range(r):
  17.     tt.left(ang(i / n) - an)
  18.     tt.forward(1)
  19.     an = ang(i / n)
  20. tt.done()
  21.  
Advertisement
Add Comment
Please, Sign In to add comment