Skip to content
Related Articles

Related Articles

Improve Article
turtle.down() method in Python
  • Last Updated : 16 Jul, 2020

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 :

 Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.  

To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course. And to begin with your Machine Learning Journey, join the Machine Learning – Basic Level Course




My Personal Notes arrow_drop_up
Recommended Articles
Page :