turtle.towards() function in Python Last Updated : 26 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.towards() This function is used to return the angle, between the line from turtle-position to the position specified by x, y, and the turtle's start orientation. Syntax : turtle.towards(x, y=None) Parameters: Arguments Description xa number or a pair/vector of numbers or a turtle instanceya number or None or None Below is the implementation of the above method with an example : Python3 # import package import turtle # go towards east ang=turtle.towards(100,0) # print angle print(ang) # go towards north ang=turtle.towards(0,100) # print angle print(ang) # go towards west ang=turtle.towards(-100,0) # print angle print(ang) # go towards south ang=turtle.towards(0,-100) # print angle print(ang) Output : 0.0 90.0 180.0 270.0 Here we can see that one can easily get an angle towards any coordinate point without going to that point. In the above example turtle remain on (0,0) i.e. home and get all angles to the specified position without any movement. Comment More infoAdvertise with us Next Article turtle.towards() function in Python D deepanshu_rustagi Follow Improve Article Tags : Python Python-turtle Practice Tags : python Similar Reads turtle.tracer() 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.tracer() This function is used to turn turtle animation on or off and set a 1 min read turtle.stamp() 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.stamp() This method is used to stamp a copy of the turtleshape onto the canv 1 min read turtle.reset() 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.reset() This function is used to delete the turtle's drawings and restore it 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.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.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.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.speed() function in Python The turtle module in Python enables graphics and animations using Tkinter. It supports object-oriented and procedural approaches. The turtle.speed() method is used to control the speed of the turtle's movement. It accepts a numerical value or a predefined string and adjusts the turtle's speed accord 2 min read turtle.shape() function in Python The turtle module in Python simplifies graphical programming, making it ideal for beginners. It supports both object-oriented and procedural approaches and relies on Tkinter as its graphical engine. One of its key functions, turtle.shape() allows users to set or retrieve the shape of the turtle curs 3 min read turtle.showturtle() 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.showturtle() This method is used to makes the turtle visible. It doesn't req 1 min read Like