Commit f99a997e by BellCodeEditor

save project

parent 3f683fb4
Showing with 14 additions and 7 deletions
# 写入同学们的捐赠明细:
new = ""
with open(r'C:\Users\Administrator\Desktop\test.txt','r',encoding='utf-8') as file:
for a in file:
a = a.replace('1','3')
print(a)
\ No newline at end of file
a=input()
ls=[]
ls.append(a)
while a:
a=input()
ls.append(a.split())
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