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

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

1、

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

2、

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

3、

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

4、

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

5、

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

6、

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

7、

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

8、

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

9、

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

10、

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

11、

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

12、

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

13、

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

    Dev.step(-5)
    Dev.step(5)
    
    Spaceship.turnRight()
    Spaceship.step(4)
    Dev.step(1)
    Dev.step(-1)

14、

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

15、

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

16、

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

17、

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

18、

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

19、

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

20、

python 复制代码
for i in range(4):
    Dev.step(6)
    Dev.turnLeft()
    Dev.step(3)
    Dev.step(-5)
    Dev.step(2)
    Dev.turnRight()
    Dev.step(-6)
    Dev.turnLeft()
相关推荐
笑远2 分钟前
Oracle/MySQL/PostgreSQL 到信创数据库数据同步简介
数据库·python·etl
夏小悠23 分钟前
从Manus到OpenManus:多智能体协作框架如何重构AI生产力?
人工智能·python·agent·manus·openmanus
追寻向上31 分钟前
《JMeter自动化测试实战指南:从环境搭建到Python集成》
开发语言·python·jmeter
字节程序员39 分钟前
JMeter使用BeanShell断言
开发语言·python·jmeter
程序员三藏40 分钟前
Jmeter请求发送加密参数
自动化测试·软件测试·python·测试工具·jmeter·测试用例·接口测试
yicode41 分钟前
Python每日一包:aiohttp
后端·python
这里有鱼汤41 分钟前
程序员必看!突破编程瓶颈!这3种设计模式让你的Python项目飞起来
后端·python·设计模式
这里有鱼汤43 分钟前
加班党福音!只需5分钟,Python帮你搞定手机号归属地查询!让你有更多时间摸鱼
后端·python
victor6643 分钟前
java核心内容笔记
前端·python
MrYZhou1 小时前
fastapi在vscode中运行推荐环境配置 (二)
后端·python·fastapi