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


import turtle

window = turtle.Screen()
t = turtle.Turtle()
t.hideturtle()
t.speed(0)

def draw(x, y):
    t.clear()
    ans = window.textinput("Погода", "Введите температуру:")
    if ans is None:
        return
    temp = int(ans)

    t.penup()
    if temp >= 25:
        t.goto(0, 50)
        t.dot(150, "yellow")
        text = "Жарко! Возьми кепку"
    elif temp >= 10:
        t.goto(-40, 50)
        t.dot(90, "yellow")
        t.goto(40, 20)
        t.dot(80, "gray")
        text = "Тепло, возьми кофту"
    elif temp >= 0:
        t.goto(0, 50)
        t.dot(100, "gray")
        text = "Прохладно, надень куртку"
    else:
        t.goto(0, 50)
        t.dot(90, "lightblue")
        text = "Мороз! Шапка и шарф"

    t.goto(0, -100)
    t.write(text, align="center", font=("Arial", 18, "bold"))

window.onclick(draw)
draw(0, 0)
window.mainloop()