【问题标题】:How do I find the x and y coordinates of the turtle in the turtle graphics module?如何在海龟图形模块中找到海龟的 x 和 y 坐标?
【发布时间】:2018-10-16 19:22:21
【问题描述】:

我想要一种更有效的方法来查找海龟的 x 和 y 坐标,而不仅仅是计数。

【问题讨论】:

标签: python turtle-graphics


【解决方案1】:

有一个内置的海龟函数来查找当前位置。

>>>turtle.pos()
(440.00,-0.00)

它将当前位置 (x,y) 作为 Vec2D 向量返回。

【讨论】:

    猜你喜欢
    • 2013-10-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-05-30
    • 1970-01-01
    • 1970-01-01
    • 2012-05-17
    • 1970-01-01
    相关资源
    最近更新 更多