码迷,mamicode.com
首页 > 其他好文 > 详细

玫瑰花

时间:2018-04-13 23:35:01      阅读:207      评论:0      收藏:0      [点我收藏+]

标签:span   nbsp   pen   htc   for   bsp   ora   import   div   

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)

 

玫瑰花

标签:span   nbsp   pen   htc   for   bsp   ora   import   div   

原文地址:https://www.cnblogs.com/GPF1/p/8824557.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!