import turtle
t = turtle.Turtle()
t.speed(0)
t.width(1)
# 1. 60 КРУГОВ
for i in range(60):
if i % 5 == 0:
t.pencolor("red")
if i % 5 == 1:
t.pencolor("green")
if i % 5 == 2:
t.pencolor("blue")
if i % 5 == 3:
t.pencolor("cyan")
if i % 5 == 4:
t.pencolor("purple")
t.penup()
t.goto(0, 170)
t.setheading(i * 6)
t.forward(85)
t.pendown()
t.circle(85)
# 2. 60 ЛИНИЙ
for i in range(60):
if i % 5 == 0:
t.pencolor("red")
if i % 5 == 1:
t.pencolor("green")
if i % 5 == 2:
t.pencolor("blue")
if i % 5 == 3:
t.pencolor("cyan")
if i % 5 == 4:
t.pencolor("purple")
t.penup()
t.goto(350, 170)
t.setheading(i * 6)
t.pendown()
t.forward(130)
# 3. 20 УГЛОВ
t.penup()
t.goto(-350, -180)
t.setheading(0)
t.pendown()
for i in range(20):
if i % 5 == 0:
t.pencolor("red")
if i % 5 == 1:
t.pencolor("green")
if i % 5 == 2:
t.pencolor("blue")
if i % 5 == 3:
t.pencolor("cyan")
if i % 5 == 4:
t.pencolor("purple")
t.left(45)
t.forward(25)
t.right(90)
t.forward(25)
t.left(45)
# 4. 20 УГЛОВ ПО КРУГУ
for i in range(20):
if i % 5 == 0:
t.pencolor("red")
if i % 5 == 1:
t.pencolor("green")
if i % 5 == 2:
t.pencolor("blue")
if i % 5 == 3:
t.pencolor("cyan")
if i % 5 == 4:
t.pencolor("purple")
t.penup()
t.goto(0, -170)
t.setheading(i * 18)
t.forward(70)
t.pendown()
for j in range(10):
t.forward(25)
t.right(36)
# 5. 20 ВОСЬМИУГОЛЬНИКОВ
for i in range(20):
if i % 5 == 0:
t.pencolor("red")
if i % 5 == 1:
t.pencolor("green")
if i % 5 == 2:
t.pencolor("blue")
if i % 5 == 3:
t.pencolor("cyan")
if i % 5 == 4:
t.pencolor("purple")
t.penup()
t.goto(350, -170)
t.setheading(i * 9)
t.forward(70)
t.right(45)
t.pendown()
for j in range(8):
t.forward(70)
t.left(45)
turtle.done()