from turtle import*
from random import randint
from time import sleep

finish = 200
def dance(t):
    
def wall():
    speed(10)
    penup()
    color('red')
    pensize(5)
    goto(-160, 90)
    pendown()
    goto(-160, -90)
    penup()
    goto(190, 90)
    pendown()
    goto(190, -90)
    hideturtle
def start(t, x, y, color):
    t.penup()
    t.shape('turtle')
    t.color(color)
    t.goto(x, y)
wall()
t1 = Turtle()
start(t1, -170, 40, 'steel blue')
t2 = Turtle()
start(t2, -170, -40, 'pink')
t3 = Turtle()
start(t3, -170, 0, 'green')
t4 = Turtle()
start(t4, -170, -80, 'purple')
    
sleep(1) 

while t1.xcor() < finish and t2.xcor() < finish and t3.xcor() < finish and t4.xcor() < finish:
    t1.forward(randint(1, 10))
    t2.forward(randint(1, 10))
    t3.forward(randint(1, 10))
    t4.forward(randint(1, 10))
    
sleep(1)  

#Подводим итог
