
Lv.1
签名:
在 ...... 中回复
附:后面两个链接
img-prod-cms-rt-microsoft-com.akamaized.net/cms/api/am/imageFileData/RE4wyU9?ver=cd9e
2023-01-18T10:26:51 点赞:0
在 【Python作品分享】新的作品-766666666666666666666666【作业帖】 中回复
化简:
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()2024-06-28T21:28:03 点赞:1
在 【Python作品分享】新的作品-766666666666666666666666【作业帖】 中回复
继续化简
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]2024-06-28T22:26:30 点赞:1
在 【Python作品分享】114514【教程贴】 中回复
from turtle import *
from time import *
# 其实没必要
from tqdm import tqdm
print('正在渲染海龟图')
for i in tqdm(range(100)):
sleep(0.1)
print('完成渲染')
print('正在准备画笔')
for i in tqdm(range(100)):
sleep(0.1)
print('完成准备')
# 其实没必要
p = Pen()
p.pensize(5)
p.speed(numinput('画笔速度是多少:', '0-10', default=0, minval=0, maxval=10))
p.pencolor(textinput('颜色:', '英语单词'))
a = numinput('角度:', '数字', default=90)
for i in range(int(numinput('重复执行多少次:', '数字', default=10, minval=0))):
p.fd((i+1)*10)
p.lt(a)
done()2024-07-01T19:33:02 点赞:0