【python】turtle龟绘制疯狂洗脑词“淡黄的长裙,蓬松的头发”

turtle龟绘制疯狂洗脑词“淡黄的长裙,蓬松的头发”,

为什么文字会有声音!

不要再唱啦!

import turtle
import random
t = turtle.Pen()
s = 10
colorss = ['lightcoral', 'coral', 'darkorange', 'gold', 'palegreen', 'paleturquoise' ,'skyblue','plum', 'hotpink', 'pink']
writess = ['淡黄的长裙', '蓬松的头发']
r = random.randrange(0, 257, 10)
g = random.randrange(0, 257, 10)
b = random.randrange(0, 257, 10)

for i in range(0, 50):
    t.pensize(random.randint(1,5))
    t.pencolor(colorss[i % 10])
    t.penup()
    t.write(writess[i % 2],font=("Arial", random.randint(5,50)))
    t.pencolor("white")
    t.rt(75)
    t.fd(s)
    s = random.randint(50,200)
turtle.done()

效果图:

posted @ 2020-04-03 16:52  HelenLee01  阅读(123)  评论(0编辑  收藏  举报