ICode国际青少年编程竞赛- Python-2级训练场-识别循环规律2

ICode国际青少年编程竞赛- Python-2级训练场-识别循环规律2

1、

python 复制代码
for i in range(3):
    Dev.step(3)
    Dev.turnRight()
    Dev.step(4)
    Dev.turnLeft()

2、

python 复制代码
for i in range(3):
    Spaceship.step(3)
    Spaceship.turnRight()
    Spaceship.step(1)

3、

python 复制代码
Dev.turnLeft()
Dev.step(Dev.x - Item[1].x)
for i in range(2):
    Dev.turnRight()
    Dev.step(4)
    Dev.turnLeft()
    Dev.step(-4)

4、

python 复制代码
for i in range(3):
    Dev.turnRight()
    Dev.step(3)
    Dev.turnLeft()
    Dev.step(3)

5、

python 复制代码
for i in range(3):
    Dev.turnLeft()
    Dev.step(2)
    Dev.turnRight()
    Dev.step(2)

6、

python 复制代码
for i in range(3):
    Spaceship.turnLeft()
    Spaceship.step(2)
    Dev.step(1)
    Dev.step(-1)
    Spaceship.turnRight()
    Spaceship.step(2)
    Dev.step(-1)
    Dev.step(1)
    Spaceship.step()

7、

python 复制代码
for i in range(4):
    Spaceship.step(1)
    Dev.turnLeft()
    Dev.step(1)
    Dev.step(-1)
    
    Spaceship.step(3)
    Spaceship.turnLeft()

8、

python 复制代码
for i in range(4):
    Dev.step(5)
    Dev.turnRight()
    Dev.step(3)
    Dev.turnRight()
    Dev.step(4)
    Dev.step(-2)
    Dev.turnLeft()

9、

python 复制代码
for i in range(4):
    Dev.step(-1)
    Dev.step(5)
    Dev.step(-1)
    Dev.turnRight()

10、

python 复制代码
for i in range(4):
    Dev.step(3)
    Dev.turnLeft()
    Dev.step(3)
    Dev.step(-1)
    Dev.turnRight()
    Dev.step(2)
    Dev.turnLeft()

11、

python 复制代码
for i in range(4):
    Dev.step(1)
    Dev.step(-1)
    Spaceship.step()
    Dev.step(-3)
    Dev.step(3)
    
    Spaceship.step(6)
    Spaceship.turnLeft()
    Spaceship.step(3)
    Spaceship.turnLeft()
    Spaceship.turnLeft()
    Dev.turnRight()

12、

python 复制代码
for i in range(4):
    Dev.turnRight()
    Dev.step(1)
    Dev.step(-3)
    Dev.step(2)
    
    Spaceship.step(4)
    Spaceship.turnRight()
    Spaceship.step(1)

13、

python 复制代码
for i in range(3):
    Dev.turnLeft()
    Dev.step(1)
    Dev.turnRight()
    Dev.step(3)
for i in range(3):
    Dev.turnLeft()
    Dev.step(5)

14、

python 复制代码
for i in range(4):
    Spaceship.step(4)
    Spaceship.turnRight()
    Spaceship.step(2)
    
    Dev.step(-1)
    Dev.step(3)
    Dev.step(-2)
    Dev.turnLeft()
    
    Spaceship.turnRight()
    Spaceship.turnRight()
    Spaceship.step(2)

15、

python 复制代码
for i in range(4):
    Spaceship.step(1)
    Dev.step(1)
    Dev.step(-1)
    Dev.turnRight()
    
    Spaceship.turnLeft()
    Spaceship.step(3)
    Spaceship.turnRight()
    Spaceship.step(4)
    
    Dev.step(-2)
    Dev.step(2)
    Spaceship.turnRight()
    Spaceship.step(1)

16、

python 复制代码
for i in range(4):
    Spaceship.step(4)
    
    Dev.turnLeft()
    Dev.step(-2)
    Dev.step(6)
    Dev.step(-4)
    
    Spaceship.step(3)
    Spaceship.turnLeft()
    Spaceship.step(1)
    Spaceship.turnRight()
    Spaceship.step(2)
    Spaceship.turnLeft()

17、

python 复制代码
for i in range(4):
    Spaceship.step(2)
    Dev.step(-1)
    Dev.step(3)
    Dev.step(-2)
    Spaceship.turnRight()
    Spaceship.turnRight()
    Spaceship.step(6)
    Spaceship.turnRight()
    Dev.turnLeft()

18、

python 复制代码
for i in range(3):
    Dev.step(-4)
    Dev.turnRight()
    Dev.step(-5)

19、

python 复制代码
for i in range(3):
    Spaceship.step(4)
    Spaceship.turnRight()
    Spaceship.step(2)
    Spaceship.turnLeft()
    Spaceship.step(3)
    Spaceship.turnRight()
    Spaceship.step(2)

20、

python 复制代码
for i in range(4):
    Spaceship.step(3)
    Spaceship.turnRight()
    Spaceship.step(4)
    Spaceship.turnLeft()
    Spaceship.step(2)
    Spaceship.turnRight()
相关推荐
白拾18 分钟前
使用Conda管理python环境的指南
开发语言·python·conda
是刃小木啦~38 分钟前
三维模型点云化工具V1.0使用介绍:将三维模型进行点云化生成
python·软件工程·pyqt·工业软件
总裁余(余登武)44 分钟前
算法竞赛(Python)-万变中的不变“随机算法”
开发语言·python·算法
一个闪现必杀技1 小时前
Python练习2
开发语言·python
Eric.Lee20211 小时前
音频文件重采样 - python 实现
人工智能·python·深度学习·算法·audio·音频重采样
大神薯条老师1 小时前
Python从入门到高手5.1节-Python简单数据类型
爬虫·python·深度学习·机器学习·数据分析
Mr.D学长1 小时前
毕业设计 深度学习社交距离检测系统(源码+论文)
python·毕业设计·毕设
wdxylb2 小时前
解决Python使用Selenium 时遇到网页 <body> 划不动的问题
python
代码骑士2 小时前
【一起学NLP】Chapter3-使用神经网络解决问题
python·神经网络·自然语言处理
wxin_VXbishe2 小时前
springboot合肥师范学院实习实训管理系统-计算机毕业设计源码31290
java·spring boot·python·spring·servlet·django·php