Commit 741481ad by BellCodeEditor

save project

parent e643b3ed
Showing with 26 additions and 16 deletions
def ii(): def ii(unit):
total = [] try:
while True: unit=int(unit)
unit= input("请输入:") except:
if unit== 'q': print('sb')
break else:
else: print('-'*30)
try:
unit=int(unit) return unit
except: def sum(money):
print('sb') count=0
else: for i in money:
total.append(unit) count+=i
print('-'*30) return count
return total
result=new total = []
while True:
unit= input("请输入:")
if unit== 'q':
break
else:
total.append(ii(unit))
print(sum(total))
\ 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