ICode国际青少年编程竞赛- Python-4级训练场-综合训练4

ICode国际青少年编程竞赛- Python-4级训练场-综合训练4

1、
在这里插入图片描述

Dev.turnLeft()
Dev.step(3)
Dev.turnRight()
Dev.step(3)
Dev.turnLeft()
Dev.step(4)

2、
在这里插入图片描述

for i in range(3):
    Dev.step(2)
    Dev.turnRight()
    while Flyer[i].disappear():
        wait()
    Dev.step(2 + i)
    Dev.turnLeft()

3、
在这里插入图片描述

for i in range(3):
    Dev.step(2 + 2 * i)
    while Dev.y != Item[i + 1].y:
        wait()

4、
在这里插入图片描述

for i in range(4):
    Spaceship.step(5)
    Spaceship.turnRight()
    Spaceship.step(1)
    Dev.turnRight()
    Dev.step(1)
    for j in range(4):
        Dev.step(3)
        Dev.turnRight()
    Dev.step(-1)
    Spaceship.turnLeft()
    Spaceship.turnLeft()
    Spaceship.step(1)
    Spaceship.turnLeft()
    Spaceship.step(5)
    Spaceship.turnLeft()

5、
在这里插入图片描述

for i in range(4):
    for j in range(3):
        Spaceship.step(3)
        Spaceship.turnRight()
    Spaceship.step(6)

6、

在这里插入图片描述

for i in range(2):
    for j in range(3 - i):
        Spaceship.step(1 + j + i * 3)
        Dev.step(i + j + 1)
        Dev.step(-1 - j - i)
    Spaceship.turnRight()
    Dev.turnRight()
Spaceship.step(6)
Dev.step(2)

7、
在这里插入图片描述

for i in range(3):
    for j in range(3):
        Dev.step(2)
        Dev.turnRight()
        Dev.step(2)
        Dev.turnLeft()
    Spaceship.step(6)
    Spaceship.turnLeft()
    Spaceship.step(1)
    Spaceship.turnRight()
    Dev.step(-5)

8、
在这里插入图片描述

for i in range(3):
    for j in range(3):
        Dev.turnRight()
        Dev.step(1)
        Flyer[i].step(1)
        Dev.turnLeft()
        Dev.step(1)
        Dev.step(-1)
    Dev.step(-2)

9、
在这里插入图片描述

for i in range(3):
    for j in range(3):
        Spaceship.step(2 + i)
        Dev.step(3 - j)
        Dev.step(-3 + j)
    Spaceship.turnLeft()
    Dev.turnLeft()

10、

在这里插入图片描述

for i in range(4):
    Dev.step(7 + 2 * i)
    for j in range(3):
        Dev.turnRight()
        Dev.step(3 + i)

11、
在这里插入图片描述

for i in range(3):
    for j in range(3):
        Dev.step(-2 - j)
        Dev.step(2 + j)
        Spaceship.step(2)
    Spaceship.turnLeft()
    Spaceship.step(2)
    Spaceship.turnRight()

12、
在这里插入图片描述

for i in range(3):
    for j in range(3):
        Dev.step(11 - 4 * i)
        Dev.turnRight()
    Spaceship.step(2)
    Spaceship.turnLeft()
    Dev.step(9 - 4 * i)
    Dev.turnRight()
    Spaceship.step(2)
    Spaceship.turnRight()

13、
在这里插入图片描述

for i in range(7):
    Flyer[i].step(8 - i)
    Flyer[7 + i].step(7 - i)
    Dev.step(1)
    Dev.turnRight()
    Dev.step(1)
    Dev.turnLeft()

14、
在这里插入图片描述

for i in range(10):
    if i < 1 or i > 5:
        Flyer[i].step(3)
for i in range(3):
    Spaceship.step(2)
    for j in range(4):
        Dev.step(6 - 2 * i)
        Dev.turnRight()
        Dev.step(6 - 2 * i)

15、

在这里插入图片描述

for i in range(4):
    for j in range(3):
        Spaceship.step(1)
        Spaceship.turnRight()
        Spaceship.step(1)
        Spaceship.turnLeft()
    
    Spaceship.turnRight()
    Dev.step(1)
    Dev.step(-1)
    Spaceship.step(3)
    Dev.step(1)
    Dev.step(-1)
    Dev.turnRight()

16、

在这里插入图片描述

for i in range(2):
    for j in range(3):
        while Flyer[i * 3 + j].disappear():
            wait()
        Dev.step(2 + j)
    Dev.turnRight()

17、
在这里插入图片描述

for i in range(7):
    Dev.step(2)
    Dev.turnLeft()
    for j in range(8 - i):
        Flyer[7 - j].step(2)
    Dev.step(9 - i)
    Dev.step(i - 9)
    Dev.turnRight()

18、

在这里插入图片描述

for i in range(5):
    Dev.turnRight()
    Dev.step(7)
    if i < 4:
        Dev.step(-7)
        Dev.turnLeft()
        Dev.step(2)
        Flyer[5 - i].step(2)
        Flyer[4 - i].step(2)

19、
在这里插入图片描述

for i in range(4):
    Spaceship.step(2 + i)
    while Flyer[i].disappear():
        wait()
    Dev.step(-2 - i)
    for j in range(4):
        Dev.step(-1 - i)
        Dev.turnLeft()
    Dev.step(i)
    while Flyer[i].disappear():
        wait()
    Dev.step(2)

20、
在这里插入图片描述

Spaceship.step(5)
Spaceship.turnRight()
for i in range(4):
    Dev.step(1)
    Dev.turnLeft()
    for j in range(2):
        Dev.step(5 - 3*j)
        Dev.turnRight()
    Dev.step(10)
    Dev.turnRight()
    while (Item[i].x != Dev.x) or (Item[i].y != Dev.y):
        wait()
    Dev.step(1)
    Spaceship.step(5)
    while Flyer[1 + 2*i].disappear():
        wait()
    Dev.step(2)
    Spaceship.turnRight()
    Spaceship.step(5)
    Dev.turnLeft()
  • 10
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

青岛少儿编程-王老师

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值