Commit 2e575e2f by BellCodeEditor

save project

parent c29cb048
import func
b=a()
print(sum(b))
\ No newline at end of file
file=open(r'C:\Users\admin\Desktop\book.txt',"w",encoding="utf-8")
file.write('小兰:12本\n小丽:11本\n李文:9本\n张伟:16本\n')
file.close
\ No newline at end of file
......@@ -11,10 +11,9 @@ def a():
else:
total.append(unit)
return total
b=a()
def sum():
def sum(b):
c=0
for i in b:
c+=i
return c
print(sum())
\ No newline at end of file
# print(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