turtle.xcor() function in Python Last Updated : 21 Jul, 2020 Comments Improve Suggest changes Like Article Like Report The turtle module provides turtle graphics primitives, in both object-oriented and procedure-oriented ways. Because it uses Tkinter for the underlying graphics, it needs a version of Python installed with Tk support. turtle.xcor() This function is used to return the turtle's x coordinate of the current position of turtle. It doesn't require any argument. Syntax : turtle.xcor() Below is the implementation of the above method with an example : Example : Python3 # import package import turtle # check x coordinate print(turtle.xcor()) turtle.forward(100) # check x coordinate print(turtle.xcor()) turtle.right(45) turtle.forward(100) # check x coordinate print(turtle.xcor()) turtle.right(90) turtle.forward(100) # check x coordinate print(turtle.xcor()) turtle.right(45) turtle.forward(100) # check x coordinate print(turtle.xcor()) Output : 0.0 100.0 170.710678119 100.0 0.0 Comment More infoAdvertise with us Next Article turtle.xcor() function in Python D deepanshu_rustagi Follow Improve Article Tags : Python Python-turtle Practice Tags : python Similar Reads turtle.ycor() function in Python The turtle module provides turtle graphics primitives, in both object-oriented and procedure-oriented ways. Because it uses Tkinter for the underlying graphics, it needs a version of Python installed with Tk support. turtle.ycor() This function is used to return the turtle's y coordinate of the curr 1 min read turtle.undo() function in Python The turtle module provides turtle graphics primitives, in both object-oriented and procedure-oriented ways. Because it uses Tkinter for the underlying graphics, it needs a version of Python installed with Tk support. turtle.undo() This function is used to undo (repeatedly) the last turtle action. Th 1 min read turtle.write() function in Python turtle module in Python provides a way to create graphics and animations using Tkinter. The turtle.write() method is used to display text at the turtleâs current position on the canvas. This function helps in labeling graphics, adding instructions or displaying values dynamically. It allows both obj 3 min read turtle.dot() function in Python The turtle module provides turtle graphics primitives, in both object-oriented and procedure-oriented ways. Because it uses Tkinter for the underlying graphics, it needs a version of Python installed with Tk support. turtle.dot()This function is used to draw a circular dot with a particular size, wi 2 min read turtle.setx() function in Python The turtle module provides turtle graphics primitives, in both object-oriented and procedure-oriented ways. Because it uses tkinter for the underlying graphics, it needs a version of Python installed with Tk support. turtle.setx() This method is used to set the turtle's first coordinate to x, leave 1 min read turtle.home() function in Python The turtle module provides turtle graphics primitives, in both object-oriented and procedure-oriented ways. Because it uses Tkinter for the underlying graphics, it needs a version of Python installed with Tk support. turtle.home() This function is used to move the turtle to the origin i.e. coordinat 1 min read turtle.tilt() function in Python The turtle module provides turtle graphics primitives, in both object-oriented and procedure-oriented ways. Because it uses tkinter for the underlying graphics, it needs a version of Python installed with Tk support. turtle.tilt() This function is used to rotate the turtleshape by the angle from its 1 min read turtle.sety() function in Python The turtle module provides turtle graphics primitives, in both object-oriented and procedure-oriented ways. Because it uses Tkinter for the underlying graphics, it needs a version of Python installed with Tk support. turtle.sety() This method is used to set the turtle's second coordinate to y, leavi 1 min read turtle.seth() function in Python The turtle module provides turtle graphics primitives, in both object-oriented and procedure-oriented ways. Because it uses Tkinter for the underlying graphics, it needs a version of Python installed with Tk support. turtle.seth() This method is used to set the orientation of the turtle to to_angle. 2 min read turtle.mode() function in Python The turtle module provides turtle graphics primitives, in both object-oriented and procedure-oriented ways. Because it uses Tkinter for the underlying graphics, it needs a version of Python installed with Tk support. turtle.mode() This function is used to set turtle-mode ('standard', 'logo' or 'worl 1 min read Like