今天要给大家展现的程序是:布朗运动!
可以扫码体验作品并且获取Python源代码!
项目源代码:
import turtle
import random
screen = turtle.Screen()
screen.tracer(0)
tList = []
n = random.randint(200,500)
m = 10
for i in range(n):
t = turtle.Turtle()
t.hideturtle()
t.penup()
t.speed(0)
r = random.randint(0,255)
g = random.randint(0,255)
b = random.randint(0,255)
x = random.randint(-300,300)
y = random.randint(-300,300)
&nb