|
发表于 2024-7-15 20:31:06
|
显示全部楼层
请回复您的答案^_^
-------- 问答题 --------
第 0 题的答案是:
第 1 题的答案是:
第 2 题的答案是:
第 3 题的答案是:
第 4 题的答案是:
第 5 题的答案是:
第 6 题的答案是:
第 7 题的答案是:
第 8 题的答案是:
第 9 题的答案是:
第 10 题的答案是:
-------- 动动手 --------
请将第 0 题的代码写在下方:
file_1 = open("fishC.txt", "r")
file_2 = open("fishD.txt", "w")
str_1 = file_1.read()
str_2 = str_1[10:15]
file_2.write(str_2)
file_1.close()
file_2.close()
请将第 1 题的代码写在下方:
file = open("FishC.txt", "r")
str_0 = file.read()
str_1 = str_0[:15]
file.close()
file = open("FishC.txt", "w")
file.write(str_1)
file.close()
请将第 2 题的代码写在下方:
file = open("永久存储_1_3.py", "r", encoding="utf_8")
str_file = file.read()
print(str_file)
请将第 3 题的代码写在下方:
file_zip = open("target.zip", "r", encoding="utf_8", errors="ignore")
file_jpg = open("test.jpg", "r", encoding="utf_8", errors="ignore")
file_new = open("new_test.jpg", "w", encoding="utf_8", errors="ignore")
str_zip = file_zip.read()
str_jpg = file_jpg.read()
file_new.write(str_jpg)
file_new.write(str_zip)
file_zip.close()
file_jpg.close()
file_new.close() |
|