Commit 1c2b2b78 by BellCodeEditor

save project

parent bf5de3fd
Showing with 15 additions and 3 deletions
...@@ -10,7 +10,19 @@ def sb(): ...@@ -10,7 +10,19 @@ def sb():
print("输入整数,重新输入") print("输入整数,重新输入")
else: else:
total.append(unit) total.append(unit1)
return total return total
r = sb()
\ No newline at end of file
r = sb()
def sum(alist):
count = 0
for i in alist:
count = count + i
return count
n = sum(r)
print(n)
\ 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