猫史档案馆


【Python作品分享】新的作品【教程贴】

用户:懂事的扎古nvF1懂事的扎古nvF1查看:0 回复:1 评论:0 创建时间:2021-08-20T12:06:59


【作品展示】

center_image

 

【作品介绍】

1

 

【作品源代码】

import turtle

__Pen = turtle.Pen()
t = turtle.Pen()
t.speed(0)
turtle.bgcolor('black')
sides = 13
colors = ['red', 'yellow', 'blue', 'orange', 'green',
          'purple', 'gray', 'brown', 'pink', 'white',
           'wheat', 'gold', 'silver']
for x in range(360):
    t.pencolor(colors[(x % sides)])
    t.forward(((x * 3) / sides + x))
    t.left((360 / sides + 1))
    t.pensize(((x * sides) / 200))
    t.left(90)

 

【提示】

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

https://python.codemao.cn


回复

上一页1 页 / 共 1下一页
Q_A_G________Q_A_G________

fromturtleimport* speed(0) bgcolor('black') sides=13 colors=['red','yellow','blue','orange','green', 'purple','gray','brown','pink','white', 'wheat','gold','silver'] forxinrange(360): pencolor(colors[(x%sides)]) fd(((x*3)/sides+x)) left((360/sides+1)) pensize(((x*sides)/200)) left(90) 改成这样少打点字imgsrc="http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/0b/tootha_thumb.gif"alt="emotion_嘻嘻"imgsrc="http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/0b/tootha_thumb.gif"alt="emotion_嘻嘻"imgsrc="http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/0b/tootha_thumb.gif"alt="emotion_嘻嘻"

点赞0


评论