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.end_fill()
This method is used to Fill the shape drawn after the call begin_fill(). It doesn’t take any argument.
Syntax :
turtle.end_fill()
Below is the implementation of the above method with an example :
Example:
Python3
# importing package import turtle # set turtle position # and color turtle.up() turtle.goto( 0 , - 30 ) turtle.down() turtle.color( "yellow" ) # start fill block turtle.begin_fill() # all instruction within this # block are filled with turtle # color as set above turtle.circle( 60 ) # end fill block turtle.end_fill() # hide the turtle turtle.hideturtle() |
Output :