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()
相关推荐
m0_748235951 小时前
Python大数据可视化:基于Python的王者荣耀战队的数据分析系统设计与实现_flask+hadoop+spider
hadoop·python·flask
Dyan_csdn1 小时前
【Python项目】基于Python的Web漏洞挖掘系统
网络·python·安全·web安全
Minner-Scrapy2 小时前
DApp 开发入门指南
开发语言·python·web app
&小刘要学习&2 小时前
anaconda不显示jupyter了?
python·jupyter
jerry-892 小时前
jupyterhub_config配置文件内容
python
奔跑吧邓邓子2 小时前
【Python爬虫(36)】深挖多进程爬虫性能优化:从通信到负载均衡
开发语言·爬虫·python·性能优化·负载均衡·多进程
学长学姐我该怎么办3 小时前
年前集训总结python
python
量化投资技术3 小时前
【量化科普】Sharpe Ratio,夏普比率
python·量化交易·量化·量化投资·qmt·miniqmt
yanglamei19623 小时前
基于Python+Django+Vue的旅游景区推荐系统系统设计与实现源代码+数据库+使用说明
vue.js·python·django
虚假程序设计3 小时前
python用 PythonNet 从 Python 调用 WPF 类库 UI 用XAML
python·ui·wpf