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

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

1、

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

2、

python 复制代码
Spaceship.step()
Spaceship.turnLeft()
Spaceship.step(3)
Dev.step(2)
Dev.turnRight()
Dev.step(2)
Dev.step(-4)

3、

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

4、

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

5、

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

6、

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

7、

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

8、

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

9、

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

10、

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

11、

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

12、

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

13、

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

14、

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

15、

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

16、

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

17、

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

18、

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

19、

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

20、

python 复制代码
for i in range(5):
    Spaceship.step(2)
    Spaceship.turnLeft()
    Spaceship.step(5 - i)
    Spaceship.turnLeft()
    Spaceship.turnLeft()
    Spaceship.step(7)
    Spaceship.turnLeft()
    Spaceship.turnLeft()
    Spaceship.step(2 + i)
    Spaceship.turnRight()
相关推荐
Vertira4 分钟前
如何在 PyTorch 中自定义卷积核参数(亲测,已解决)
人工智能·pytorch·python
幼稚园的山代王1 小时前
python3基础语法梳理(一)
开发语言·python
Gyoku Mint1 小时前
机器学习×第五卷:线性回归入门——她不再模仿,而开始试着理解你
人工智能·python·算法·机器学习·pycharm·回归·线性回归
Blossom.1181 小时前
基于机器学习的智能故障预测系统:构建与优化
人工智能·python·深度学习·神经网络·机器学习·分类·tensorflow
华科云商xiao徐1 小时前
Python多线程数据爬取程序模版
爬虫·python
大白爱琴2 小时前
使用python进行图像处理—像素级操作与图像算术(4)
开发语言·图像处理·python
吴声子夜歌2 小时前
OpenCV——图像基本操作(一)
python·opencv·计算机视觉
zhanghongyi_cpp2 小时前
美食出处(文件版)
python
工业互联网专业3 小时前
基于django+vue的健身房管理系统-vue
vue.js·python·django·毕业设计·源码·课程设计·健身房管理系统
aischang3 小时前
统信桌面专业版如何使用python开发平台jupyter
开发语言·python·jupyter·统信uos