Commit 1c503254 by BellCodeEditor

auto save

parent 578e41ee
Showing with 18 additions and 5 deletions
total = [] def a():
while True: total = []
while True:
try:
unit= input("请输入:") unit= input("请输入:")
if unit== 'q': if unit=='q':
break break
unit=int(unit)
except:
print('请输入數字')
else: else:
total.append(unit) total.append(unit)
print(total) return total
\ No newline at end of file
def add(b):
x=0
for i in b:
x=x+i
return x
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