猫史档案馆


【python】九色的彩虹 看看吧

用户:爱Python的政政爱Python的政政查看:2 回复:2 评论:2 创建时间:2022-08-03T11:07:35


import turtle as t
t.bgcolor('pink')
colors = ['red','orange','yellow','green','cyan','blue','purple','black','gold']
t.speed(0)
def hx(r,c):
    t.pu()
    t.seth(90)
    t.goto(400+r,-300)
    t.pd()
    t.pensize(15)
    t.circle(400+r,180)
r = 10
for i in range(len(colors)):
    c = colors[i]
    t.color(c)
    hx(r,c)
    r+=10

t.hideturtle() 
t.done()


回复

上一页1 页 / 共 1下一页
你敢反了你敢反了

nb

点赞1


评论


刘骏森刘骏森

t.hideturtle()

不是可以写成

t.ht()

的吗

点赞1


评论