Lv.1
申丑丙戌申戊癸戌辰未
在 【Python作品分享】炫彩发呆神器【作品秀】 中回复
# 第一步:导入海归库,随机库
import turtle as t
import random
# 第二步:画笔设置
pen_colors=['red','orange','yellow','green','cyan','blue','purple']
# 设置画笔的颜色
t.pencolor("red")
# 设置画笔的速度
t.speed(500000)
# 定义初始的边长
x = 10
# 定义旋转的角度,random.randint(90,180)
y = random.randint(90, 180)
# 100 138 115 99 118 111
print(y)
# 第三步:绘画
# 重复执行绘画过程
while True:
for i in range(500):
# 画一条线
t.forward(x)
# 进行旋转
t.right(y)
x = x+1
t.pencolor(pen_colors[random.randint(0,6)])
t.clear()
t.penup()
t.goto(0,0)
t.pendown()
x = 10
y = random.randint(90, 180)
t.done()2020-04-06T16:24:51 点赞:0
在 测试哈哈哈哈哈,来看彩色字体 中回复
____________________________________________________________________________________________________________________-____________________________________________________________________________________________________________________-
2020-05-06T21:51:54 点赞:0