Lv.1
在 如何逼疯你的Python编译器 中回复
import time
import turtle as t
t.speed(1e+72)
r = 1
g = 1
b = 1
x = 1
while (r < 255):
t.pencolor(r, g, b)
t.forward((x / 5))
t.left(90)
t.circle((x / 5))
x = (x + 1)
r = (r + 1)
while (g < 255):
t.pencolor(r, g, b)
t.forward((x / 5))
t.left(90)
t.circle((x / 5))
x = (x + 1)
g = (g + 1)
while (b < 255):
t.pencolor(r, g, b)
t.forward((x / 5))
t.left(90)
t.circle((x / 5))
x = (x + 1)
r = (r - 1)
b = (b + 1)
while (r < 255):
t.pencolor(r, g, b)
t.forward((x / 5))
t.left(90)
t.circle((x / 5))
x = (x + 1)
g = (g - 1)
r = (r + 1)
time.sleep(255)
这个好看些,网页版要去掉t.colormode(255)
2022-07-16T17:53:18 点赞:1