Commit f085f29c by BellCodeEditor

auto save

parent f42ba56f
import func
dict = func.new_input()
i = func.sum(dict)
print('一共'+str(i))
\ No newline at end of file
...@@ -12,7 +12,13 @@ def new_input(): ...@@ -12,7 +12,13 @@ def new_input():
else: else:
total.append(unit) total.append(unit)
print("-"*30) print("-"*30)
print(total) return total
new_input() #---------------------------------------------------------------------
\ No newline at end of file def sum(y):
b=0
for i in y:
b=b+i
return b
\ 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