您好,欢迎来到知库网。
搜索
您的当前位置:首页啊哈编程星球-第1章-学习版

啊哈编程星球-第1章-学习版

来源:知库网

第1关: 3行

move()
move()
move()

第2关: 7行

move()
move()
move()
turn("left")
move()
move()
move()

第3关: 7行

move()
move()
move()
turn("right")
move()
move()
move()

第4关: 5行

move()
turn("left")
move(2)
turn("left")
move(3)

第5关: 11行

move(2)
turn("right")
move(2)
turn("right")
move(2)
turn("left")
move(2)
turn("left")
move(2)
turn("right")
move(2)

第6关: 4行

move(5)
turn("left")
toggle()
move(2)

第7关: 12行

move(3)
turn("right")
move(2)
turn("right")
move(2)
turn("left")
move(3)
turn("left")
move(3)
turn("left")
move(2)
toggle()

第8关: 3行

for i in range(3):
    move(3)
    turn("right")

第9关: 9行 ?

for i in range(2):
    turn("right")
    move(2)
    turn("right")
    move(2)
    turn("left")
    move(2)
    turn("left")
    move(2)

第10关: 11行 ?

for i in range(3):
    toggle()
    turn("left")
    move()
    turn("right")
    move()
    turn("left")
    move()
    turn("right")
    move()
    turn("right")

第11关: 7行

move(2)
turn("right")
move()
turn("right")
toggle()
turn("left")
move(2)

第12关: 9行

for i in range(4):
    turn("left")
    turn("left")
    move(2)
    turn("left")
    move(2)
    turn("left")
    move(2)
    toggle()

Copyright © 2019- zicool.com 版权所有 湘ICP备2023022495号-2

违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务