
import turtle as t
list1=["orangered","orange","yellow","lightgreen","cyan","deepskyblue","magenta"]
def hx(r,c):
t.pu()
t.seth(90)
t.goto(100+r,-100)
t.pd()
t.pensize(10)
t.circle(100+r,180)
r=10
for i in range(len(list1)):
c=list1[i]
t.pencolor(c)
hx(r,c)
r=r+10
t.exitonclick()
本文介绍了如何使用Python的Turtle库,通过鲜艳的颜色列表绘制一系列渐变的彩色圆环。从'orangered'到'deepskyblue',每个圆环都应用了不同的颜色,展示了基础图形操作的趣味性。
6879

被折叠的 条评论
为什么被折叠?



