sairate 7df250638d chore: 添加项目基础结构和示例代码
- 创建 .idea 目录和相关配置文件,设置项目结构
- 添加多个课堂成果示例代码,涵盖不同主题和功能
- 创建和配置 .gitignore 文件,忽略特定文件和目录
2025-07-05 09:36:00 +08:00

26 lines
768 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 请在这里编写代码
name = ['黄昏', '黎明', '007', '萧炎', '唐三']
task = ['潜入敌国获取情报',
'采摘生长在天山的雪莲花',
'给隔壁出差李阿姨家的喵喵加粮',
'营救被扣押的人质',
'破解电脑系统获取目标数据']
# 007通过密钥2获取相应的任务信息(访问列表元素)
task_007 = task[2]
print("007的特工任务" + task_007)
print()
# 获取特工列表长度
print('共有特工' + str(len(name)) + '')
# 长官要看到每位特工的任务详情
for i in range(len(name)):
print(name[i] + "的特工任务:" + task[i])
print()
# “萧炎”和“唐三”特工合作完成任务(列表的切片)
task_together = task[3:]
print(task_together)