发布网友 发布时间:2022-04-24 05:29
共1个回答
热心网友 时间:2022-06-02 17:22
import turtle
t = turtle.Pen()
turtle.bgcolor("black")
my_name=turtle.textinput("请输入你想表白的话","你的表白?")
colors=["red","yellow","purple","blue"]
for x in range(100):
t.pencolor(colors[x%4])
t.penup()
t.forward(x*4)
t.pendown()
t.write(my_name,font=("Arial",int((x+4)/4),"bold"))
t.left(92)
print("####结束####")
追答我已回答请评价