Answers for "code to draw a circle in python"

5

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)
Posted by: Guest on March-04-2021
0

area of a circle in python

#Area Of A Circle in python
R = int(input("Enter the radius of the circle: "))
PI = 22/7 #This is a constant
A = PI * R * R
print(A)
Posted by: Guest on April-21-2021

Python Answers by Framework

Browse Popular Code Answers by Language