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

循环星星

时间:2018-05-09 22:42:30      阅读:169      评论:0      收藏:0      [点我收藏+]

标签:png   imp   分享图片   pos   技术分享   http   red   begin   .com   

技术分享图片

import turtle
turtle.pencolor(red)
turtle.fillcolor(yellow)
turtle.begin_fill()

while True:
    turtle.forward(100)
    turtle.right(25)
    if(abs(turtle.pos()))<1:
        break

turtle.end_fill()
turtle.done()

 

循环星星

标签:png   imp   分享图片   pos   技术分享   http   red   begin   .com   

原文地址:https://www.cnblogs.com/liangzhenyu/p/9016840.html

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