Answers for "how to change starting position of turtle in python"

2

get position of turtle python

import turtle
t = turtle.Turtle()

turtles_position = t.pos() # Will return a tuple that includes both X and Y
# coordinates of the turtle named t respectively, E.G (200,600).

turtles_positionX = t.xcor() # Will return a float value of the turtle's
# X position.

turtles_positionY = t.ycor() # Will return a float value of the turtle's
# Y position.

###############################################################
# Make sure to round the last 2 method's numbers as without   #
# rounding you can get numbers like 299.99999999999994.       #
# (You can round with the round(integer) function)			  #
###############################################################
Posted by: Guest on September-13-2021
0

how to move turtle forward in python

turtle.forward(100)
Posted by: Guest on February-15-2021

Code answers related to "how to change starting position of turtle in python"

Python Answers by Framework

Browse Popular Code Answers by Language