520怎么表白,Python程序猿都是这样操作的
2022-08-08 19:05
2022-08-08 19:05
清酒独醉
520 I love you,简单几行代码,在最后带来一个甜蜜的冲击
2022-08-08 21:10:11
_小清纯
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("####结束####")
2022-08-08 21:10:11