Commit 9407c052 by BellCodeEditor

save project

parent 634e4bea
Showing with 12 additions and 1 deletions
...@@ -11,5 +11,15 @@ def new_input(): ...@@ -11,5 +11,15 @@ def new_input():
print("请重新输入一个数字") print("请重新输入一个数字")
else: else:
total.append(unit) total.append(unit)
print(total) print("-"*30)
return total
a=new_input()
def sum(d):
s=0
for i in d:
s=s+i
print(s)
new_input() new_input()
sum(a)
\ 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