Saturday, November 16, 2024
Google search engine
HomeLanguagesturtle.end_fill() function in Python

turtle.end_fill() function in Python

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 :

 

 

Dominic Rubhabha-Wardslaus
Dominic Rubhabha-Wardslaushttp://wardslaus.com
infosec,malicious & dos attacks generator, boot rom exploit philanthropist , wild hacker , game developer,
RELATED ARTICLES

Most Popular

Recent Comments