Commit d501b18b by BellCodeEditor

save project

parent 5e4d21bc
Showing with 10 additions and 5 deletions
total = []
def a1():
total = []
while True:
unit= input("请输入:")
if unit== 'q':
......@@ -12,7 +12,12 @@ def a1():
print("int")
else:
total.append(unit)
return total
def a2(list):
j=0
for i in list:
j = i + j
return j
a1()
total=a1()
print(total)
\ No newline at end of file
print(total)
s=a2(total)
print(s)
\ 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