猫史档案馆


【Python作品分享】新的作品111【作品秀】

用户:贺小哥贺小哥查看:0 回复:0 评论:0 创建时间:2021-11-17T19:47:25


【作品展示】

center_image

 

【作品介绍】

111ww

 

【作品源代码】

import turtle
import time
import random

__Pen = turtle.Pen()


sides = 5
colours = ['red', 'blue', 'green', 'pink', 'purple', 'white', 'yellow', 'orange']
__Pen.speed(30)
a = 30
turtle.bgcolor("#000000")
x = range(360)
turtlenames = ['arrow', 'blank', 'circle', 'classic', '喵', 'triangle', 'turtle']
__Pen.shape(random.choice(turtlenames))
try:
    __Pen.pencolor(colours[(x % sides)])
except TypeError:
    for i in range(360):
        for i in range(360):
            time.sleep(1)
            a += 10
            for x in range(360):
                time.sleep(0.4)
                __Pen.pencolor(random.choice(colours))
                __Pen.right(10)
                __Pen.circle(30, steps=random.randint(3, 100))
__Pen.hideturtle()
turtle.done()

 

【提示】

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

https://python.codemao.cn


回复

上一页1 页 / 共 0下一页