Advertisement
lubattillah

circle

May 28th, 2019
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. from turtle import Turtle
  2. luba=Turtle()
  3. r = float(input("Enter a radius of a circle: "))
  4. col=input("Add colour to your circle: ")
  5. x=int(input("Enter x_coordianate: "))
  6. y=int(input("Enter y_coordinate: "))
  7. def draw_circle(t_name,r,col,x,y):
  8. t_name.color(col)#assigning colour to a circle
  9. t_name.dot(r*2)#computation for diameter of a circle
  10. t_name.penup()
  11. t_name.goto(x,y)
  12.  
  13. draw_circle(luba,r,col,x,y)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement