如何在海龟图形模块中找到海龟的 x 和 y 坐标?
How do I find the x and y coordinates of the turtle in the turtle graphics module?
我想要一种更有效的方法来查找海龟的 x 和 y 坐标,而不仅仅是计数。
有一个内置的 turtle 函数可以找到当前位置。
>>>turtle.pos()
(440.00,-0.00)
它将return当前位置 (x,y) 作为 Vec2D 向量。
我想要一种更有效的方法来查找海龟的 x 和 y 坐标,而不仅仅是计数。
有一个内置的 turtle 函数可以找到当前位置。
>>>turtle.pos()
(440.00,-0.00)
它将return当前位置 (x,y) 作为 Vec2D 向量。