icode函数入门-5-19
# 找到地图中重复的部分,定义函数,根据需要完成函数的调用
def func():
for i in range(3):
if i == 2:
Spaceship.step(2)
Spaceship.turnRight()
Spaceship.step(2)
Dev.step(2)
Dev.turnRight()
Dev.step(2)
func()
Spaceship.step(3)
Spaceship.turnLeft()
Spaceship.step(3)
Dev.turnRight()
func()
Spaceship.step(4)
Spaceship.turnRight()
Spaceship.step(1)
Dev.turnLeft()
func()