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()
相关推荐
IAM四十二14 分钟前
基于 Embedding 实现一个本地相册搜索功能
人工智能·python·llm
THMAIL2 小时前
机器学习从入门到精通 - 降维艺术:PCA与t-SNE带你玩转高维数据可视化
人工智能·python·决策树·随机森林·机器学习·分类·bootstrap
看月亮的方源2 小时前
B站小土堆-pytorch深度学习快速入门笔记
pytorch·python
pythonpapaxia2 小时前
Java异常处理:掌握优雅捕获错误的艺术
java·开发语言·python·其他
Rhys..3 小时前
python sqlalchemy模型的建立
jvm·数据库·python·oracle
正在走向自律3 小时前
解锁WebRTC在数字人领域的无限潜能
人工智能·python·llm·webrtc·数字人·微软autogen·实时语音交互
@半良人3 小时前
解构复杂财务逆向业务:如何优雅地生成与管理负数单?
python
Eira-Z4 小时前
日志分析与安全数据上传脚本
python·计算机网络
潘达斯奈基~4 小时前
pytorch初级
人工智能·pytorch·python
PEI044 小时前
Java集合遍历的方法有哪些
java·windows·python