Commit f99a997e by BellCodeEditor

save project

parent 3f683fb4
Showing with 14 additions and 7 deletions
# 写入同学们的捐赠明细: a=input()
new = "" ls=[]
with open(r'C:\Users\Administrator\Desktop\test.txt','r',encoding='utf-8') as file: ls.append(a)
for a in file: while a:
a = a.replace('1','3') a=input()
print(a) ls.append(a.split())
\ No newline at end of file ls.pop(-1)
print(ls)
sum=0
women=0
for i in ls:
sum=sum+int(i[1])
print("平均年龄是{:.2f}".format(sum))
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment