Jump to content

How do you make your turtle look to the right of the screen? (python)


Go to solution Solved by C2dan88,

Use setheading?

So I'm trying to make a etch-a-sketch on turtle python and I am having trouble when I try to make the turtle face right of the screen because I dont know which way the player will face when they clear the screen.


from turtle import Turtle, Screen

Ched = Turtle()

ScreamButTheAisAeAndTheMisAN = Screen()

def forward():
def back():

def right():

def left():

def clear_screen():
    Ched.setpos(0, 0)


ScreamButTheAisAeAndTheMisAN.onkey(key="w", fun=forward)
ScreamButTheAisAeAndTheMisAN.onkey(key="d", fun=right)
ScreamButTheAisAeAndTheMisAN.onkey(key="s", fun=back)
ScreamButTheAisAeAndTheMisAN.onkey(key="a", fun=left)
ScreamButTheAisAeAndTheMisAN.onkey(key="c", fun=clear_screen)



Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now