Skip to content

How to make circle in Python?

import turtle
def draw_circle(turtle,color,size,x,y):
  turtle.penup()
  turtle.color(color)
  turtle.fillcolor(color)
  turtle.goto(x,y)
  turtle.pendown()
  turtle.begin_fill()
  turtle.circle(size)
  turtle.end_fill()
square=turtle.Turtle()
square.speed(500)
draw_circle(square, "green", 50, 25, 0)
See also  Python code snippet - How to plot a linear equation in matplotlib?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.