Commit 86e471f9 by BellCodeEditor

save project

parent e954fcf2
Showing with 14 additions and 5 deletions
...@@ -9,8 +9,17 @@ def p(): ...@@ -9,8 +9,17 @@ def p():
except: except:
print("'输入整数'") print("'输入整数'")
else: else:
total.append(unit) total.append(u)
return total return total
a=p()
print(a) def sum_list(total):
\ No newline at end of file s=0
for i in total:
s=s+i
return s
un=p()
sd=sum_list(un)
print(sd)
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