2024-04-26 18:04:38 发布
网友
我正在尝试编写一个程序,根据用户输入绘制形状。我希望它使用turtle.pos()函数打印形状的每个角点,但是我试图获得打印输出:
turtle.pos()
"The first corner is at: x, y, with a heading of: d."
目前我使用的印刷品是
其输出为:
"The first corner is at: (x, y,), with a heading of: d."
{{cdtuple}将
弄明白了-不知怎么的我忘了
turtle.xcor()/turtle.ycor()
并能把它们打印成整数。在
print("The first corner is at:", turtle.position()[0], "with a heading of:" turtle.heading() + ".")
弄明白了-不知怎么的我忘了
并能把它们打印成整数。在
相关问题 更多 >
编程相关推荐