玫瑰花

import turtle
turtle.setup(800,800,150,150)
turtle.speed(0)
turtle.penup()
turtle.goto(0,100)
turtle.pendown()
turtle.pencolor("firebrick")
#玫瑰
turtle.begin_fill()
turtle.fillcolor("lightcoral")
turtle.left(30)
turtle.fd(20)
turtle.left(80)
turtle.fd(30)
turtle.left(10)
turtle.fd(30)
turtle.right(20)
turtle.fd(40)
turtle.left(30)
for i in range(40):
    turtle.left(i+30)
    turtle.fd(30)
turtle.end_fill()
#,
turtle.penup()
turtle.goto(0,100)
turtle.pencolor("green")
turtle.pendown()
turtle.pensize(3)
turtle.right(30)
turtle.fd(70)
turtle.begin_fill()
turtle.fillcolor("green")
turtle.right(150)
turtle.fd(50)
turtle.left(30)
turtle.fd(40)
turtle.left(150)
turtle.fd(40)
turtle.left(30)
turtle.fd(40)
turtle.end_fill()
turtle.right(70)
turtle.fd(50)

turtle.begin_fill()
turtle.fillcolor("green")
turtle.left(150)
turtle.fd(50)
turtle.right(30)
turtle.fd(40)
turtle.right(150)
turtle.fd(40)
turtle.right(30)
turtle.fd(40)
turtle.end_fill()
turtle.left(60)
turtle.fd(50)

 

你可能感兴趣的:(玫瑰花)