猫史档案馆


【Python作品分享】新的作品-2

用户:LBNLBN查看:0 回复:0 评论:0 创建时间:2022-08-03T10:26:23


【作品展示】

center_image

 

【作品介绍】

 

【作品源代码】

import turtle,math

a=turtle.Pen()
t=turtle.Pen()
turtle.bgcolor("dim gray")
a.pencolor("steel blue")
t.pencolor("coral")
a.pensize(5)
t.pensize(5)
a.penup()
a.goto(-math.sin(math.radians(-400))*50,-210)
a.pendown()
t.penup()
t.goto(math.sin(math.radians(-400))*50, -210)
t.pendown()
for i in range(-200,200):
    if i%20==0:
        a.pencolor("azure")
        a.pensize(3)
        a.goto(math.sin(math.radians(i*2))*50, i-10)
    else:
        a.pencolor("steel blue")
        a.pensize(5)
    t.goto(math.sin(math.radians(i*2))*50, i-10)
    a.goto(-math.sin(math.radians(i*2))*50, i)
turtle.dont()

 

【提示】

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

https://python.codemao.cn


回复

上一页1 页 / 共 0下一页