igorich1376

Turtle_begin

Aug 16th, 2024 (edited)
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.54 KB | None | 0 0
  1. import turtle
  2. ############## настройки
  3. t = turtle
  4. #t.shape('turtle')
  5. t.color('green')
  6. t.pensize(3)
  7. ############## программа
  8. sides = int(input())
  9. t.fillcolor('yellow') # выбор цвета для закрашивания замкнутой фигуры
  10. t.begin_fill() # начало закрашивания
  11. for i in range(1,sides+1):
  12.     t.fd(10)
  13.     t.lt(360/sides)
  14. t.end_fill() # окончание окрашивания
  15. ############# действия с окном по окончании
  16. #t.exitonclick()
  17. t.done()
Advertisement
Add Comment
Please, Sign In to add comment