简体   繁体   中英

How do I find the x and y coordinates of the turtle in the turtle graphics module?

我希望找到一种更有效的方法来查找海龟的x和y坐标,而不仅仅是进行计数。

There is a built in turtle function to find current position.

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

It will return the current location (x,y) as a Vec2D Vector.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM