weixuan -奥利给turtle

# 用变量,for循环,画一个蓝色blue的五角星
import turtle
import random
turtle.bgcolor('black')
turtle.color('white')

# 颜色 光  太阳光----》云   光的散射 彩虹 七种 —————》 白
# 三基色  红绿蓝  光   red 0-255  green 0-255 blue 0-255
# 三原色  红黄蓝  颜料

jiaodu = 144
turtle.speed(0)
# ctrl + c 复制
# ctrl + v 粘贴
# ctrl + x 剪切
# ctrl + z 撤销
# turtle.color("white")
turtle.color(30/256, 144/256, 255/256)
turtle.width(5)

for ai in range(10000):
    turtle.pensize(random.randint(1, 10))
    changdu = random.randint(1, 15)
    r = random.randint(0, 255)
    g = random.randint(0, 255)
    b = random.randint(0, 255)
    turtle.color(r / 256, g / 256, b / 256)
    # 五角星
    # for qwer in range(5):
    #     turtle.fd(changdu)
    #     turtle.right(60)
    # 写字  write  font字体
    # turtle.write("鸡你太美",font=(None, random.randint(10,50)))
    turtle.write("奥利给", font=(None, random.randint(10, 50)))
    turtle.up()
    turtle.goto(random.randint(-850, 850), random.randint(-550, 550))
    turtle.down()

turtle.done()



发布了390 篇原创文章 · 获赞 19 · 访问量 1万+

猜你喜欢

转载自blog.csdn.net/houlaos/article/details/104458153