注册账号-全站资源免费下载
您需要 登录 才可以下载或查看,没有账号?注册账号
x
- import turtle
- t = turtle.Pen()
- turtle.bgcolor("black")
- sides=6
- colors=["red","yellow","green","blue","orange","purple"]
- for x in range(360):
- t.pencolor(colors[x%sides])
- t.forward(x*3/sides+x)
- t.left(360/sides+1)
- t.width(x*sides/180)
- t.left(91)
- print("####结束####")
复制代码
- import turtle
- t = turtle.Pen()
- turtle.bgcolor("black")
- sides=6
- colors=["red","yellow","green","blue","orange","purple"]
- for x in range(360):
- t.pencolor(colors[x%sides])
- t.forward(x*3/sides+x)
- t.left(360/sides+1)
- t.width(x*sides/200)
- print("####结束####")
复制代码
|