找回密码
 中文实名注册
搜索
查看: 28|回复: 0

王凯晨-点开就会爆炸

[复制链接]

7

主题

8

回帖

684

积分

高级会员

积分
684
发表于 3 天前 | 显示全部楼层 |阅读模式
本帖最后由 王凯晨 于 2026-7-21 11:27 编辑

[Python] 纯文本查看 复制代码
from turtle import*
import turtle
import random

screen = Screen()
screen.setup(500,650)
turtle.speed(0)
turtle.colormode(255)
turtle.setheading(60)
for i in range(5):
    a = random.randint(0,255)
    b = random.randint(0,255)
    c = random.randint(0,255)
    turtle.color(a,b,c)
    turtle.begin_fill()
    turtle.forward(150)
    turtle.left(143)
    turtle.forward(120)
    turtle.left(90)
    turtle.forward(90)
    turtle.left(120)
    turtle.left(72)
    turtle.end_fill()
turtle.setheading(270)
turtle.forward(300)
turtle.backward(300)


相关帖子

Welcome
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 中文实名注册

本版积分规则

快速回复 返回顶部 返回列表