Skip to content
Related Articles

Related Articles

turtle.down() method in Python

View Discussion
Improve Article
Save Article
  • Last Updated : 16 Jul, 2020
View Discussion
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.down()

The turtle.down() method is used to pull back the pen down on the screen. It gives drawing on moving to another position or direction. 

turtle.down() or turtle.pd() or turtle.pendown()

Here, this method can be called with three names as written above i.e; it has Aliases: pendown | pd | down. There is no argument required for this method.

Below is the implementation of the above method with some examples :

Example 1:

Python3




# import package
import turtle
  
  
# forward the turtle (drawing)
turtle.forward(50)
  
# up the turtle
turtle.up()
  
# forward the turtle (no drawing)
turtle.forward(50)
  
# down the turtle
turtle.down()
  
# forward the turtle (drawing)
turtle.forward(50)

Output :

Example 2:

Python3




# import package
import turtle
  
  
# forward the turtle (drawing)
turtle.forward(50)
  
# turn right 90 degrees
turtle.right(90)
  
# up the turtle
turtle.up()
  
# forward the turtle (no drawing)
turtle.forward(50)
  
# down the turtle
turtle.down()
  
# turn right 90 degrees
turtle.right(90)
  
# forward the turtle (drawing)
turtle.forward(50)

Output :


My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!