Advertisement
jabela

TurtleFlower

Oct 13th, 2018
271
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.90 KB | None | 0 0
  1. import turtle
  2.  
  3. def draw_flower(x,y,radius):
  4.     turtle.speed(9)
  5.     turtle.penup()
  6.     turtle.goto(x,y)
  7.  
  8.     turtle.color("green")
  9.     turtle.backward(radius/10)
  10.     turtle.begin_fill()
  11.     turtle.right(90)
  12.     turtle.forward(radius*1.5)
  13.     turtle.left(90)
  14.     turtle.forward(radius/5)
  15.     turtle.left(90)
  16.     turtle.forward(radius*1.5)
  17.     turtle.left(90)
  18.     turtle.forward(radius/5)
  19.     turtle.end_fill()
  20.     turtle.backward(radius/10)
  21.  
  22.     turtle.color("yellow")
  23.  
  24.     for i in range(12):
  25.         turtle.begin_fill()
  26.         turtle.circle(radius, 60)
  27.         turtle.left(120)
  28.         turtle.circle(radius, 60)
  29.         turtle.end_fill()
  30.         turtle.right(30)
  31.  
  32.     turtle.color("black")
  33.     turtle.begin_fill()
  34.     turtle.right(90)
  35.     turtle.forward(radius/3)
  36.     turtle.left(90)
  37.     turtle.circle(radius/3)
  38.     turtle.end_fill()
  39.     turtle.goto(100,100)
  40.  
  41. draw_flower(0,0,100)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement