Welcome to Code Sharer, a code gallery for creating, saving and sharing all kinds of code snippets.

Python — Draw a Circle using Turtle in Python 3

Posted On: Friday, August 3, 2018 at 6:06 AM Last updated: Friday, August 3, 2018 at 6:07 AM

This is a short script shows you how to draw a circle using the Turtle package in Python 3.

I have done a staged circle so you can gain some appreciation as to how the turtle.circle() function works.

The colours are defined using HTML colour codes.





import turtle
import math
turtle.pencolor('#32c18f')

turtle.circle(120, 90)
turtle.pencolor('#FF0000')
turtle.circle(120, 90)
turtle.pencolor('#32c18f')

turtle.circle(120, 90)
turtle.pencolor('#FF0000')
turtle.circle(120, 90)