turtle.seth() function in Python (original) (raw)

Last Updated : 18 Aug, 2025

turtle.seth()method sets the orientation (heading) of the turtle to a specified angle in degrees, measured counterclockwise from the positive x-axis (east). The turtle’s position remains unchanged, and only its facing direction is altered. This method is also available through the alias turtle.setheading().

Syntax

turtle.seth(to_angle)
turtle.setheading(to_angle)

**Parameters: to_angle (int | float) is the angle to set the turtle’s heading to, in degrees. Common headings in standard mode:

**Returns: This method only changes the turtle's heading, not its position.

Below is the implementation of the above method with an example :

Python `

import turtle

turtle.seth(0) turtle.forward(80) turtle.write("East")

turtle.home() turtle.setheading(90) turtle.forward(80) turtle.write("North")

turtle.home() turtle.seth(180) turtle.forward(80) turtle.write("West", align="right")

turtle.home() turtle.setheading(270) turtle.forward(80) turtle.write("South")

turtle.ht()

`

**Output :

**Explanation: