from turtle import*
import math

rt(45)
go = 1
color("red")

distance_in = int(numinput("Wie weit darf sich die Turtle vom Mittelpunkt entfernen??", "            Gerade Zahl von 1-unendlich           ",300,minval=1))

for i in range(4):
    go = 1
    while go == 1:
        fd(50)
        dot(25)
        x = xcor()
        y = ycor()
        distance = math.sqrt((x**2) + (y**2))
        if distance >= distance_in:
            go = 0
        else:
            if distance <= -distance_in:
                go = 0
                
            else:
                go = 1
                
    bk(distance_in)
    rt(90)