Commit 12b618db by BellCodeEditor

save project

parent 290e7bda
Showing with 17 additions and 16 deletions
total = [] def new_input():
while True: total = []
unit= input('请输入:(q)') while True:
if unit== 'q': money= input('请输入:(q)')
break if money== 'q':
else: break
try
moneey=int(moneey)
excepti:
print("数字")
else: else:
moneey.append(moneey) try:
fnailly: money=int(money)
print("_"*30) except:
print("数字")
else:
total.append(money)
finally:
print("_"*30)
return total return total
resule=new_input result=new_input()
print(total) print(result)
\ No newline at end of file \ 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