![]() |
VOOZH | about |
turtle.home() method moves the turtle back to the origin (0, 0) and sets its orientation to face east (0 degrees). This method is useful when you want to reset the turtle’s position and heading. It does not clear the drawing or reset other turtle properties.
turtle.home()
This example demonstrates how home() can reset the turtle’s position and orientation after moving and rotating.
Output
(0.0, 0.0)
(100.0, 0.0)
(0.0, 0.0)
(0.0, -100.0)
(0.0, 0.0)
Explanation:
This example shows how home() can help in drawing repeated patterns by resetting the turtle to origin before each iteration.
Output
👁 ImageExplanation: