Загрузка данных


import turtle

t = turtle.Turtle()
t.speed(0)
t.width(2)

# 1. КРУГИ

for i in range(10):
    t.penup()
    t.goto(-430 + i * 50, 80 + i * 50)
    t.pendown()

    if i % 3 == 0:
        t.pencolor("red")
    if i % 3 == 1:
        t.pencolor("green")
    if i % 3 == 2:
        t.pencolor("blue")

    t.circle(18)


# 2. ЛИНИИ

for i in range(20):
    t.penup()
    t.goto(250, 220)
    t.setheading(i * 18)
    t.pendown()

    if i % 4 == 0:
        t.pencolor("red")
    if i % 4 == 1:
        t.pencolor("cyan")
    if i % 4 == 2:
        t.pencolor("blue")
    if i % 4 == 3:
        t.pencolor("green")

    t.forward(120)


# 3. УГЛЫ

t.penup()
t.goto(-400, -200)
t.setheading(0)
t.pendown()

for i in range(10):

    if i % 4 == 0:
        t.pencolor("red")
    if i % 4 == 1:
        t.pencolor("green")
    if i % 4 == 2:
        t.pencolor("blue")
    if i % 4 == 3:
        t.pencolor("orange")

    t.left(45)
    t.forward(25)
    t.right(90)
    t.forward(25)
    t.left(45)


# 4. КВАДРАТЫ

for i in range(20):

    t.penup()
    t.goto(250, -220)
    t.setheading(i * 9 + 45)
    t.forward(70)
    t.left(135)

    if i % 4 == 0:
        t.pencolor("red")
    if i % 4 == 1:
        t.pencolor("cyan")
    if i % 4 == 2:
        t.pencolor("blue")
    if i % 4 == 3:
        t.pencolor("green")

    t.pendown()

    for j in range(4):
        t.forward(100)
        t.left(90)


turtle.done()