用户:依依Amy查看:0 回复:0 评论:0 创建时间:2019-08-28T20:01:24
【作品展示】

【作品介绍】
刚学python没多久,这个是自学的,请多指教。
【作品源代码】
# 艺术感圆圈线条(记得全屏)
import turtle,random
pen = turtle.Pen()
def draw_circle(color, size, x, y):
pen.setx(x)
pen.sety(y)
pen.speed(300)
undefined.pendown()
pen.fillcolor(color)
pen.pencolor(color)
pen.begin_fill()
pen.circle(size)
pen.end_fill()
# 可以继续添加颜色(记得改动第18行)
color = ['red', 'orange', 'yellow', 'green', 'brown', 'blue', 'violet', 'puple', 'pink']
for x in range(30):
size = random.randint(20, 70)
color1 = color[random.randint(0, 8)]
x = random.randint((-200), 200)
y = random.randint((-200), 200)
draw_circle(color1, size, x, y)
【提示】
部分含有Python第三方库相关内容的作品,在海龟编辑器网页端无法运行哦!如遇到这种情况,可以打开下面的链接,下载海龟编辑器客户端:
https://python.codemao.cn