「已注销」 2021-10-13 22:01 采纳率: 75%
浏览 71
已结题

用Python画名字,用turyle库

名字白璐璐,请帮忙算坐标,谢谢
import turtle

def run(angle, lenth):
turtle.seth(angle)
turtle.fd(lenth)

def change(x, y):
turtle.penup()
turtle.goto(x, y)
turtle.pendown()
def init():
turtle.pensize(10)
turtle.pencolor("purple")

turtle.setup(800, 400, 200, 200)
init()

  • 写回答

1条回答 默认 最新

  • CSDN专家-黄老师 2021-10-13 22:13
    关注

    写字直接用write就行了,如下:

    import turtle
    t= turtle.Turtle()
    t.write("霜叶红于二月花", font=("微软雅黑", 20, "normal")) #fonttype有normal, bold, italic, underline
    turtle.mainloop()
    
    

    img

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

问题事件

  • 已结题 (查看结题原因) 10月13日
  • 已采纳回答 10月13日
  • 创建了问题 10月13日