from turtle import*
import random
speed(0)
def drawcicle(a,x,y):
up()
setposition(x,y)
down()
b=random.randint(0,1)
if b==1:
begin_fill()
circle(a)
end_fill()
else:
circle(a)
for i in range(100):
x=random.randint(-180,180)
y=random.randint(-180,180)
a=random.randint(5,20)
r=random.randint(40,250)
g=random.randint(40,250)
b=random.randint(40,250)
colormode(255)
color(r,g,b)
drawcicle(a,x,y)
用python随机画泡泡
最新推荐文章于 2024-07-27 12:20:46 发布