Commit 5f85bf2b by BellCodeEditor

save project

parent e1364b9a
Showing with 11 additions and 2 deletions
def new_input(): def new_input():
total = [] total = []
while True: while True:
...@@ -11,7 +10,17 @@ def new_input(): ...@@ -11,7 +10,17 @@ def new_input():
except: except:
print("请输入数字") print("请输入数字")
else: else:
total.append(unit) total.append(dff)
return total return total
def sum(ff):
count=0
for i in ff:
count+=i
return count
dff=new_input() dff=new_input()
print(dff) print(dff)
sum1=sum(dff)
print(sum1)
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