Commit c3654d52 by BellCodeEditor

save project

parent 8e51ab88
Showing with 8 additions and 20 deletions
def new_input(): money=[12,32,35,47]
total=[] def sum(money):
while True: list=0
unit=input("请输入(q退出):") for i in money:
if unit=='q': list=list+i
break return list
else: print('您一共消费了'+str(money)+'元')
try: \ No newline at end of file
unit==int(unit)
except:
print('请输入一个整数')
else:
print(unit)
finally:
print('-'*30)
print(total)
return total
result=new_input()
print(result)
\ 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