turtle.window_height() function in Python
Last Updated :
26 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.window_height()
This function is used to return the height of the turtle window. It doesn’t require any argument.
Syntax :
turtle.window_height()
Below is the implementation of the above method with an example :
Python3
import turtle
print (turtle.window_height())
sc = turtle.Screen()
sc.setup( 300 , 300 )
sc.bgcolor( "green" )
print (turtle.window_height())
for i in range ( 5000 ):
for j in range ( 5000 ):
pass
sc.setup( 500 , 400 )
sc.bgcolor( "red" )
print (turtle.window_height())
|
Output :
648
300
400
Share your thoughts in the comments
Please Login to comment...