搜索
您的当前位置:首页正文

啊哈编程星球-第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()
Top