猫史档案馆


【Python作品分享】新的作品-766666666666666666666666【作业帖】

用户:萍的辰宝萍的辰宝查看:2 回复:3 评论:2 创建时间:2024-06-28T20:02:43


【作品展示】

center_image

 

【作品介绍】

666666666666666666666666666666666666666666666666666666

 

【作品源代码】

import time
import turtle  # 导入turtle库
from tqdm import tqdm
print('正在渲染海龟图')
for i in tqdm(range(100)):
    time.sleep(0.1)
print('完成渲染')
print('正在准备画笔')
for i in tqdm(range(100)):
    time.sleep(0.1)
for i in tqdm(range(100)):
    time.sleep(0.1)
print('完成准备')
print('正在启用函数')
for i in tqdm(range(100)):
    time.sleep(0.1)
for i in tqdm(range(100)):
    time.sleep(0.1)
print('完成启用')
pen = turtle.Pen()
turtle.colormode(255)
pen.hideturtle()
def windmill():
    pen.begin_fill()
    pen.forward(150)
    pen.left(90)
    pen.circle(75, 180)
    pen.end_fill()
pen.fillcolor(255, 113, 82)
windmill()
pen.fillcolor(255, 218, 115)
windmill()
pen.fillcolor(31, 198, 167)
windmill()
pen.fillcolor(15, 162, 234)
windmill()
turtle.done()

 

【提示】

部分含有Python第三方库相关内容的作品,在海龟编辑器网页端无法运行哦!如遇到这种情况,可以打开下面的链接,下载海龟编辑器客户端:

https://python.codemao.cn


回复

上一页1 页 / 共 1下一页
可爱的我真聪明可爱的我真聪明

好家伙,铺垫一大片,注释都没用center_image

点赞2


评论


J_J_DJ_J_D

化简:

import turtle as t;l=[[255, 113, 82],[255, 218, 115],[31, 198, 167],[15, 162, 234]];t.colormode(255);p = t.Pen();p.hideturtle()
def a(i):p.fillcolor(*i);p.begin_fill();p.forward(150);p.left(90);p.circle(75, 180);p.end_fill()
[a(i) for i in l];t.done()

点赞1


评论


J_J_DJ_J_D

继续化简

import turtle as a
d=["#FF7152","#FFDA73","#1FC6A7","#0FA2EA"];f = a.Pen();f.ht()
def b(c):f.fillcolor(c);f.begin_fill();f.fd(150);f.lt(90);f.circle(75, 180);f.end_fill()
[b(e) for e in d]

点赞1


评论