Skip to content
Related Articles

Related Articles

Improve Article
turtle.isvisible() function in Python
  • Last Updated : 21 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.isvisible()

The turtle.isvisible() method is used to return True if the Turtle is shown, False if it’s hidden. This method does not require any argument.

Syntax :

turtle.isvisible()

Below is the implementation of above method for better understandings :

Example 1:



Python3




# import package
import turtle
  
  
# check turtle visibility
print(turtle.isvisible())
  
# motion
turtle.forward(100)
turtle.right(90)
  
# hide the turtle
turtle.ht()
  
# motion
turtle.forward(100)
  
# check turtle visibility
print(turtle.isvisible())
  
# motion
turtle.right(90)
turtle.forward(100)
  
# show the turtle
turtle.st()
  
# check turtle visibility
print(turtle.isvisible())

Output :

True
False
True

 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 :