用户:
草窝里der斑鸠查看:0 回复:1 评论:0 创建时间:2020-03-28T20:17:24
【作品展示】

【作品介绍】
这个作品可以随机画出圆圈
【作品源代码】
import random
import turtle
t = turtle.Pen()
colors = ["rad","yellow","blue","green","orange","purple","gray","white"]
t.speed(1000)
turtle.bgcolor("black")
for x in range(100):
a = random.randint(0,7)
b = random.randint(0,50)
x = random.randint(-300,300)
y = random.randint(-300,300)
t.pencolor(colors[a])
t.fillcolor(colors[a])
t.penup()
t.goto(x,y)
t.pendown()
t.begin_fill()
t.circle(b)
t.end_fill()
【提示】
部分含有Python第三方库相关内容的作品,在海龟编辑器网页端无法运行哦!如遇到这种情况,可以打开下面的链接,下载海龟编辑器客户端:
https://python.codemao.cn