import turtle as t

WIDTH, HEIGHT = 800, 650
COLOR = 'gold'
BGCOLOR = 'beige'
ALT_COLOR = 'goldenrod'

def prepare():
    t.setup(WIDTH, HEIGHT)
    t.color(COLOR)
    t.pencolor(ALT_COLOR)
    t.bgcolor(BGCOLOR)

    t.shapesize(2,2,2)
    t.pensize(3)
    t.speed(4)
    t.delay(0)

def draw_axes():
    size = 600
    # x
    t.dot(15)
    t.up()
    t.goto(- size / 2, 0)
    t.down()
    t.fd(size)
    t.stamp()

    # y
    t.up()
    t.goto(0, - size / 2)
    t.down()
    t.left(90)
    t.fd(size)
    t.stamp()

    t.home()
    t.up()
    t.left(90)

    step = 30
    pos_x = - size / 2

    t.goto(pos_x, -5)

    while(pos_x < size / 2):
        t.down()
        t.fd(10)
        t.up()
        pos_x = pos_x + step
        t.goto(pos_x, -5)
    t.fd(10)
    t.write(f'X', font=("Times New Roman", 16, "bold"))

    t.right(90)
    pos_y = - size / 2
    t.goto(-5, pos_y)

    while(pos_y < size / 2):
        t.down()
        t.fd(10)
        t.up()
        pos_y += step
        t.goto(-5, pos_y)
    t.fd(20)
    t.write(f'Y', font=("Times New Roman", 16, "bold"))

    t.hideturtle()

def draw_point(x, y):
    t.up()
    t.goto(x, y)
    t.down()
    t.dot(10)

    t.color(ALT_COLOR)
    t.write(f'({x:.0f}, {y:.0f})')

prepare()
draw_axes()
t.onscreenclick(draw_point)
t.done()