Commit 8d142c8d by BellCodeEditor

save project

parent c7672bf7
Showing with 13 additions and 5 deletions
total = []
def a():
def new_input():
total = []
while True:
unit= input("请输入:")
unit= input("请输入单价(q退出):")
if unit== 'q':
break
else:
try:
unit=int(unit)
except:
print("请重新输入一个数字")
try:
pass
else:
pass
total.append(unit)
print(total)
a()
\ 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