【codecombat】 试玩全攻略 第九关 循环又循环

   第九关 循环又循环

  看提示的蓝色箭头,先向右,向上,向左,向下,再向右构成一个循环,一直走下去吧。

  奔跑吧,我的英雄!

  

代码如下:

# Code inside of a while-true loop will repeat forever!

while True:
    # Move right
    hero.moveRight()
    # Move up
    hero.moveUp()
    
    # Move left
    hero.moveLeft()
    
    # Move down
    hero.moveDown()
    pass
转载请注明出处,否则作者有权追究法律责任! 转载请注明出处,否则作者有权追究法律责任!
原文地址:https://www.cnblogs.com/hali/p/6197879.html