Advertisement
ceoklimov2

Untitled

Mar 29th, 2020
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. from mobilechelonian import Turtle # импортируем модуль для рисования
  2.  
  3. t = Turtle()
  4. t.speed(5)
  5. t.pencolor('magenta')
  6. def left_turn():
  7. for i in range(10):
  8. t.forward(15)
  9. t.left(9)
  10.  
  11. def petal():
  12. left_turn()
  13. t.left(90)
  14. left_turn()
  15.  
  16.  
  17. petals_qty = int(input("How many petals ?"))
  18. for _ in range(petals_qty):
  19. petal()
  20. t.left(180-round(180/petals_qty, 0))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement