[Python] How can I rotate a shape from the bottom in turtle

Discussão em 'Python' iniciado por Stack, Março 12, 2025.

  1. Stack

    Stack Membro Participativo

    I am trying to make a turtle analog clock, and to make the second, minute, an hour hands I am making a shape with turtle, and using .tilt() to tilt it 6 degrees every second. The thing is, when I run .tilt() it rotates the ship from the middle, whereas I want to have it rotate from the bottom point (like an analog clock). Is there a way to do that, or do I need to find another way to make this program?

    Here is my code:

    from turtle import *
    import time

    turtle = Turtle()
    turtle.shape("square")
    turtle.shapesize(6, .1)

    tilt_amnt = 0

    for x in range (60):
    turtle.tilt(tilt_amnt)
    tilt_amnt = tilt_amnt + 6
    time.sleep(1)

    Continue reading...

Compartilhe esta Página