猫史档案馆


【Python作品分享】新的作品

用户:稚气的彗星猫aHyh稚气的彗星猫aHyh查看:1 回复:2 评论:1 创建时间:2020-10-08T15:43:19


【作品展示】

center_image

 

【作品介绍】

只用眼睛就行了。

 

【作品源代码】

import turtle
from itertools import cycle

colors = cycle(['red', 'orange', 'yellow', 'green', 'blue', 'purple'])


def draw_circle(size, angle, shift):
    turtle.pencolor(next(colors))
    turtle.circle(size)
    turtle.right(angle)
    turtle.forward(shift)
    draw_circle(size+5, angle+1, shift+1)


turtle.bgcolor('black')
turtle.speed('fast')
turtle.pensize(4)
draw_circle(30, 0, 1)

 

【提示】

部分含有Python第三方库相关内容的作品,在海龟编辑器网页端无法运行哦!如遇到这种情况,可以打开下面的链接,下载海龟编辑器客户端:

https://python.codemao.cn


回复

上一页1 页 / 共 1下一页
白篮白篮

emotion_编程猫_点赞

点赞1


评论


稚气的彗星猫aHyh稚气的彗星猫aHyh

大家可以把 turtle.pensize(4) 改成 turtle.pensize(40) 等

点赞0


评论