The Wayback Machine - https://web.archive.org/web/20230212183522/https://www.geeksforgeeks.org/turtle-backward-method-in-python/
Skip to content
Related Articles
Open in App
Not now

Related Articles

turtle.backward() method in Python

Improve Article
Save Article
  • Difficulty Level : Basic
  • Last Updated : 16 Jul, 2020
Improve Article
Save Article

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.backward()

The turtle.backward() method is used to move the turtle backward by the value of the argument that it takes. It gives a line on moving to another position or direction with backward motion.

Syntax:

turtle.backward(distance)

The argument it takes is distance { a number (integer or float) }. So, it moves the turtle backward by the specified distance, in the opposite direction the turtle is headed. Below is the implementation of the above method with some examples :

Example 1:

Python3




# importing packages
import turtle
  
  
# move turtle backward with 
# distance = 100
turtle.backward(100)

Output :

Example 2:

Python3




# importing package
import turtle
  
  
# move the turtle backward by 50
turtle.backward(50)
  
# change the direction
turtle.right(90)
  
# move the turtle backward by 50 again
turtle.backward(50)

Output :

My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!