turtle.forward Python · 模块功能
让小海龟向前移动指定像素。
怎么用
import turtle turtle.forward(d)
小例子
import turtle
turtle.forward(100)
print('前进100像素')
运行结果
前进100像素
提醒:简写 fd。
官方文档:https://docs.python.org/zh-cn/3/library/turtle.html#turtle.forward
在代码里遇到不认识的词?打开代码点读机,点一下就懂 → ← Python全部词条