[Python] Draw Letters In Turtle

Discussão em 'Python' iniciado por Stack, Dezembro 21, 2024.

  1. Stack

    Stack Membro Participativo

    I just started learning turtle in python. I am tried to write my name "Idan" (capital letters), but I am stuck on "D".

    This is my code so far:

    import turtle

    t = turtle.Turtle()

    t.up()
    t.backward(400)
    t.left(90)
    t.down()
    t.forward(250)
    t.right(90)
    t.forward(62.5)
    t.backward(62.5 * 2)
    t.forward(62.5)
    t.right(90)
    t.forward(250)
    t.right(90)
    t.forward(62.5)
    t.backward(62.5 * 2)
    t.up()
    t.backward(100)
    t.right(90)
    t.down()
    t.forward(250)
    for x in range(180):
    t.forward(1)
    t.right(1)


    But when I run it it gives me a small half circle.

    Is there a way to make it do a half circle that will create a "D"

    Continue reading...

Compartilhe esta Página