import turtle

t = turtle.Turtle()
t.speed(5)
t.pensize(3)
t.color("blue")

w = 30   # digit width
h = 50   # digit height

def move_to(x, y):
    t.penup()
    t.goto(x, y)
    t.pendown()

def draw_0(x, y):
    move_to(x, y)
    t.setheading(0)
    t.forward(w)    # top
    t.setheading(270)
    t.forward(h)    # right
    t.setheading(180)
    t.forward(w)    # bottom
    t.setheading(90)
    t.forward(h)    # left

def draw_2(x, y):
    move_to(x, y)
    t.setheading(0)
    t.forward(w)    # top
    t.setheading(270)
    t.forward(h//2) # upper right
    t.setheading(180)
    t.forward(w)    # middle
    t.setheading(270)
    t.forward(h//2) # lower left
    t.setheading(0)
    t.forward(w)    # bottom

def draw_3(x, y):
    move_to(x, y)
    t.setheading(0)
    t.forward(w)    # top
    t.setheading(270)
    t.forward(h//2) # upper right
    t.setheading(180)
    t.forward(w)    # middle
    move_to(x + w, y - h//2)
    t.setheading(270)
    t.forward(h//2) # lower right
    t.setheading(180)
    t.forward(w)    # bottom

def draw_4(x, y):
    move_to(x, y)
    t.setheading(270)
    t.forward(h//2) # left
    t.setheading(0)
    t.forward(w)    # middle
    move_to(x + w, y)
    t.setheading(270)
    t.forward(h)    # right

def draw_6(x, y):
    move_to(x + w, y)
    t.setheading(180)
    t.forward(w)    # top
    t.setheading(270)
    t.forward(h)    # left
    t.setheading(0)
    t.forward(w)    # bottom
    t.setheading(90)
    t.forward(h//2) # lower right
    t.setheading(180)
    t.forward(w)    # middle

digit_map = {
    '0': draw_0, '2': draw_2, '3': draw_3, '4': draw_4, '6': draw_6
}

number = "2023060243"
gap = w + 15
start_x = -(len(number) * gap) // 2
start_y = h // 2

for i, c in enumerate(number):
    x = start_x + i * gap
    digit_map[c](x, start_y)

t.hideturtle()
turtle.done()
