猫史档案馆


【Python作品分享】可以转场的''小动画''--重置加长版【作品秀】

用户:淘气的小花猪淘气的小花猪查看:0 回复:0 评论:0 创建时间:2021-02-25T22:37:58


【作品展示】

center_image

 

【作品介绍】

可以转场的''小动画''--重置加长版

 

【作品源代码】

import turtle
a = turtle.Pen()
b = turtle.Pen()

a.hideturtle()
b.hideturtle()

a.speed(999)
b.speed(999)
a.pencolor('red')
b.pencolor('white')
a.pensize(3)
print("请耐心观看")
a.penup()
a.goto(0,0)
a.pendown()
c = 3
while c < 300:
    a.pencolor('purple')
    a.forward(c)
    a.right(75)
    a.pencolor('red')
    a.forward(c)
    a.right(75)
    c = c + 2

b.dot(10000)

a.penup()
a.goto(0, 0)
a.pendown()
c = 3
while c < 300:
    a.pencolor('coral')
    a.forward(c)
    a.right(100)
    c = c + 2

b.dot(10000)

a.penup()
a.goto(0, 0)
a.pendown()
c = 3
while c < 150:
    a.pencolor("green")
    a.forward(c)
    a.right(60)
    a.pencolor("blue")
    a.forward(c)
    a.right(60)
    c = c + 2

b.dot(10000)

a.penup()
a.goto(0, 0)
a.pendown()
c = 3
while c < 300:
    a.pencolor("fuchsia")
    a.forward(c)
    a.right(125) 
    c = c + 2

b.dot(10000)

#---------------------我是个分割线1---------------------
a.penup()
a.goto(0, 0)
a.pendown()
c = 3
while c < 300:
    a.pencolor('green')
    a.forward(c)
    a.right(190)
    a.pencolor('orange')
    a.forward(c)
    a.right(190)
    c = c + 2

turtle.done()

 

【提示】

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

https://python.codemao.cn


回复

上一页1 页 / 共 0下一页