Commit 3aac58b1 by BellCodeEditor

save project

parent 36fc793e
Showing with 23 additions and 14 deletions
total = []
while True:
unit= input("请输入:")
if unit== 'q':
break
else:
try:
unit=int(unit)
except:
print("错了")
def ABC():
total = []
while True:
unit= input("请输入:")
if unit== 'q':
break
else:
total.append(unit)
\ No newline at end of file
try:
unit=int(unit)
except:
print("错了")
else:
total.append(unit)
return total
b=ABC()
print(b)
def s(a):
count=0
for i in a:
count = count + i
return count
c=s(b)
print(c)
\ 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