我是靠谱客的博主 霸气荷花,这篇文章主要介绍用python随机画泡泡,现在分享给大家,希望可以做个参考。

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随机画泡泡的全部内容,更多相关用python随机画泡泡内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(104)

评论列表共有 0 条评论

立即
投稿
返回
顶部