Commit 8085cac3 by BellCodeEditor

save project

parent 72583780
Showing with 12 additions and 6 deletions
...@@ -11,8 +11,15 @@ ...@@ -11,8 +11,15 @@
# 刘阳 11 15 22 11 23 26 22 15 17 52 12 # 刘阳 11 15 22 11 23 26 22 15 17 52 12
# 王胜男 27 15 15 26 13 12 15 # 王胜男 27 15 15 26 13 12 15
# 王娇 12 11 12 12 15 35 23 11 # 王娇 12 11 12 12 15 35 23 11
with open(r'c:\Users\Administrator\Desktop\aaaa.txt','r',encoding='gbk') as h: with open(r'c:\Users\Administrator\Desktop\aaaa.txt','r',encoding='gbk') as wenjian:
w=h.readlines() liebiao=wenjian.readlines()
print(w) print(liebiao)
for i in w: for meigeshujv in liebiao:
print(i) fengehoudemeigeshujv=meigeshujv.split()
\ No newline at end of file suoyoushu=fengehoudemeigeshujv[1:]
he=0
for meigeshu in suoyoushu:
he=he+int(meigeshu)
suoyouming=fengehoudemeigeshujv[0]
print(suoyouming+str(he))
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