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