- 创建 .idea 目录和相关配置文件,设置项目结构 - 添加多个课堂成果示例代码,涵盖不同主题和功能 - 创建和配置 .gitignore 文件,忽略特定文件和目录
26 lines
767 B
Python
26 lines
767 B
Python
# 运行程序前, 请务必前往本课包【课程说明】处,下载课程素材,完成配置
|
|
|
|
# 参考答案一
|
|
with open('知识达人题目.txt','r', encoding="utf-8") as my_file:
|
|
p = my_file.readlines()
|
|
for line in p:
|
|
print(line)
|
|
|
|
with open('答案.txt','w', encoding="utf-8") as my_file:
|
|
for i in range(1,11):
|
|
answer = input(f'第{i}题的答案是:')
|
|
my_file.write(f'{answer}\n')
|
|
|
|
'''
|
|
# 参考答案二
|
|
with open('知识达人题目.txt','r', encoding="utf-8") as my_file:
|
|
for line in my_file:
|
|
print(line)
|
|
|
|
with open('答案.txt','w', encoding="utf-8") as my_file:
|
|
for i in range(1,11):
|
|
answer = input(f'第{i}题的答案是:')
|
|
my_file.write(f'{answer}\n')
|
|
'''
|
|
|