turtle.circle() method 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.circle() :
This method is used to draw a circle with a given radius.
Syntax: turtle.circle(radius, extent=None, steps=None)
Parameters:
- radius: Radius of the circle.
- extent: The part of the circle in degrees as an arc.
- steps: Divide the shape in the equal number of given steps.
Below is the implementation of the above method with some examples :
Example 1:
Python3
import turtle
turtle.circle( 80 )
|
Output :
Example 2:
Python3
import turtle
turtle.circle( 80 ,
extent = 180 )
|
Output :
Example 3:
Python3
import turtle
turtle.circle( 80 ,
steps = 5 )
|
Output :
Last Updated :
01 Aug, 2020
Like Article
Save Article
Share your thoughts in the comments
Please Login to comment...